diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-04-26 20:41:52 +0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 15:00:38 +0400 |
commit | a3d568f0dfbb6bc786df04ad13e0b401f80e614c (patch) | |
tree | 690eef9305ba277b63b6df5961d1a0b1331b3e6a /drivers/scsi/isci/remote_node_context.c | |
parent | 00d680ef84570bc7aea023772d27e85b0052004c (diff) | |
download | linux-a3d568f0dfbb6bc786df04ad13e0b401f80e614c.tar.xz |
isci: remove usage of sci_sas_address in scic_sds_remote_device
The sas address can be retrieved from the domain device and then
converted to the always little-endian format in the remote node context.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_node_context.c')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 59f878f11f33..e83657d554b7 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c @@ -110,6 +110,7 @@ static void scic_sds_remote_node_context_construct_buffer( struct domain_device *dev = sci_dev_to_domain(sci_dev); union scu_remote_node_context *rnc; struct scic_sds_controller *scic; + __le64 sas_addr; scic = scic_sds_remote_device_get_controller(sci_dev); @@ -124,9 +125,10 @@ static void scic_sds_remote_node_context_construct_buffer( rnc->ssp.logical_port_index = scic_sds_remote_device_get_port_index(sci_dev); - /* address is always big endian, destination is always little */ - rnc->ssp.remote_sas_address_hi = swab32(sci_dev->device_address.high); - rnc->ssp.remote_sas_address_lo = swab32(sci_dev->device_address.low); + /* sas address is __be64, context ram format is __le64 */ + sas_addr = cpu_to_le64(SAS_ADDR(dev->sas_addr)); + rnc->ssp.remote_sas_address_hi = upper_32_bits(sas_addr); + rnc->ssp.remote_sas_address_lo = lower_32_bits(sas_addr); rnc->ssp.nexus_loss_timer_enable = true; rnc->ssp.check_bit = false; |