]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
isci: remove scic_sds_remote_device_get_port_index
authorDan Williams <dan.j.williams@intel.com>
Tue, 26 Apr 2011 18:44:06 +0000 (11:44 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:00:38 +0000 (04:00 -0700)
Longer to type than the open-coded equivalent.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/remote_device.h
drivers/scsi/isci/remote_node_context.c

index f0612d46fe2bd22cc5294677dd2fe5801e89d3f2..5b82b9fb7be1433b3b55a7476379fc23b0c32fe1 100644 (file)
@@ -663,14 +663,6 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
                        ) \
        )
 
-/**
- * scic_sds_remote_device_get_port_index() -
- *
- * This macro returns the port index for the devices owning port
- */
-#define scic_sds_remote_device_get_port_index(sci_dev) \
-       (scic_sds_port_get_index(scic_sds_remote_device_get_port(sci_dev)))
-
 /**
  * scic_sds_remote_device_get_index() -
  *
@@ -687,7 +679,7 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab
 #define scic_sds_remote_device_build_command_context(device, command) \
        ((command) \
         | (scic_sds_remote_device_get_controller_peg((device)) << SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) \
-        | (scic_sds_remote_device_get_port_index((device)) << SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) \
+        | ((device)->owning_port->physical_port_index << SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) \
         | (scic_sds_remote_device_get_index((device))) \
        )
 
index e83657d554b773906a5c298c0b2bdb2480b2cb09..291df19f027b4a546f6484e416277eebc84278f1 100644 (file)
@@ -108,22 +108,20 @@ static void scic_sds_remote_node_context_construct_buffer(
 {
        struct scic_sds_remote_device *sci_dev = rnc_to_dev(sci_rnc);
        struct domain_device *dev = sci_dev_to_domain(sci_dev);
+       int rni = sci_rnc->remote_node_index;
        union scu_remote_node_context *rnc;
        struct scic_sds_controller *scic;
        __le64 sas_addr;
 
        scic = scic_sds_remote_device_get_controller(sci_dev);
-
-       rnc = scic_sds_controller_get_remote_node_context_buffer(
-               scic, sci_rnc->remote_node_index);
+       rnc = scic_sds_controller_get_remote_node_context_buffer(scic, rni);
 
        memset(rnc, 0, sizeof(union scu_remote_node_context)
                * scic_sds_remote_device_node_count(sci_dev));
 
-       rnc->ssp.remote_node_index = sci_rnc->remote_node_index;
+       rnc->ssp.remote_node_index = rni;
        rnc->ssp.remote_node_port_width = sci_dev->device_port_width;
-       rnc->ssp.logical_port_index =
-               scic_sds_remote_device_get_port_index(sci_dev);
+       rnc->ssp.logical_port_index = sci_dev->owning_port->physical_port_index;
 
        /* sas address is __be64, context ram format is __le64 */
        sas_addr = cpu_to_le64(SAS_ADDR(dev->sas_addr));