diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/isci/remote_device.h | 10 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 10 |
2 files changed, 5 insertions, 15 deletions
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h index f0612d46fe2b..5b82b9fb7be1 100644 --- a/drivers/scsi/isci/remote_device.h +++ b/drivers/scsi/isci/remote_device.h | |||
@@ -664,14 +664,6 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab | |||
664 | ) | 664 | ) |
665 | 665 | ||
666 | /** | 666 | /** |
667 | * scic_sds_remote_device_get_port_index() - | ||
668 | * | ||
669 | * This macro returns the port index for the devices owning port | ||
670 | */ | ||
671 | #define scic_sds_remote_device_get_port_index(sci_dev) \ | ||
672 | (scic_sds_port_get_index(scic_sds_remote_device_get_port(sci_dev))) | ||
673 | |||
674 | /** | ||
675 | * scic_sds_remote_device_get_index() - | 667 | * scic_sds_remote_device_get_index() - |
676 | * | 668 | * |
677 | * This macro returns the remote node index for this device object | 669 | * This macro returns the remote node index for this device object |
@@ -687,7 +679,7 @@ extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_tab | |||
687 | #define scic_sds_remote_device_build_command_context(device, command) \ | 679 | #define scic_sds_remote_device_build_command_context(device, command) \ |
688 | ((command) \ | 680 | ((command) \ |
689 | | (scic_sds_remote_device_get_controller_peg((device)) << SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) \ | 681 | | (scic_sds_remote_device_get_controller_peg((device)) << SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT) \ |
690 | | (scic_sds_remote_device_get_port_index((device)) << SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) \ | 682 | | ((device)->owning_port->physical_port_index << SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) \ |
691 | | (scic_sds_remote_device_get_index((device))) \ | 683 | | (scic_sds_remote_device_get_index((device))) \ |
692 | ) | 684 | ) |
693 | 685 | ||
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index e83657d554b7..291df19f027b 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c | |||
@@ -108,22 +108,20 @@ static void scic_sds_remote_node_context_construct_buffer( | |||
108 | { | 108 | { |
109 | struct scic_sds_remote_device *sci_dev = rnc_to_dev(sci_rnc); | 109 | struct scic_sds_remote_device *sci_dev = rnc_to_dev(sci_rnc); |
110 | struct domain_device *dev = sci_dev_to_domain(sci_dev); | 110 | struct domain_device *dev = sci_dev_to_domain(sci_dev); |
111 | int rni = sci_rnc->remote_node_index; | ||
111 | union scu_remote_node_context *rnc; | 112 | union scu_remote_node_context *rnc; |
112 | struct scic_sds_controller *scic; | 113 | struct scic_sds_controller *scic; |
113 | __le64 sas_addr; | 114 | __le64 sas_addr; |
114 | 115 | ||
115 | scic = scic_sds_remote_device_get_controller(sci_dev); | 116 | scic = scic_sds_remote_device_get_controller(sci_dev); |
116 | 117 | rnc = scic_sds_controller_get_remote_node_context_buffer(scic, rni); | |
117 | rnc = scic_sds_controller_get_remote_node_context_buffer( | ||
118 | scic, sci_rnc->remote_node_index); | ||
119 | 118 | ||
120 | memset(rnc, 0, sizeof(union scu_remote_node_context) | 119 | memset(rnc, 0, sizeof(union scu_remote_node_context) |
121 | * scic_sds_remote_device_node_count(sci_dev)); | 120 | * scic_sds_remote_device_node_count(sci_dev)); |
122 | 121 | ||
123 | rnc->ssp.remote_node_index = sci_rnc->remote_node_index; | 122 | rnc->ssp.remote_node_index = rni; |
124 | rnc->ssp.remote_node_port_width = sci_dev->device_port_width; | 123 | rnc->ssp.remote_node_port_width = sci_dev->device_port_width; |
125 | rnc->ssp.logical_port_index = | 124 | rnc->ssp.logical_port_index = sci_dev->owning_port->physical_port_index; |
126 | scic_sds_remote_device_get_port_index(sci_dev); | ||
127 | 125 | ||
128 | /* sas address is __be64, context ram format is __le64 */ | 126 | /* sas address is __be64, context ram format is __le64 */ |
129 | sas_addr = cpu_to_le64(SAS_ADDR(dev->sas_addr)); | 127 | sas_addr = cpu_to_le64(SAS_ADDR(dev->sas_addr)); |