summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-25 10:25:21 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:28 -0700
commit150fc6fc725055b400a8865e6785dc8dd0a2225d (patch)
tree800fe37980919606017c603c77d8d7384beaa7dc /drivers/scsi/isci/port.c
parent7392d27580df2d14b5c3b1a1d7989c06457a819d (diff)
downloadlinux-150fc6fc725055b400a8865e6785dc8dd0a2225d.tar.bz2
isci: fix sas address reporting
Undo the open coded and incorrect translation of the oem parameter sas address to its libsas expected format. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/port.c')
-rw-r--r--drivers/scsi/isci/port.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 446da20521c9..30da3ec703e3 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -192,6 +192,7 @@ void isci_port_link_up(
scic_port_get_properties(port, &properties);
if (properties.remote.protocols.u.bits.stp_target) {
+ u64 attached_sas_address;
struct scic_sata_phy_properties sata_phy_properties;
@@ -220,17 +221,13 @@ void isci_port_link_up(
* will not be the same as assigned to the PHY and needs
* to be obtained from struct scic_port_properties properties.
*/
+ attached_sas_address = properties.remote.sas_address.high;
+ attached_sas_address <<= 32;
+ attached_sas_address |= properties.remote.sas_address.low;
+ swab64s(&attached_sas_address);
- BUG_ON(((size_t)SAS_ADDR_SIZE / 2)
- != sizeof(properties.remote.sas_address.low));
-
- memcpy(&isci_phy->sas_phy.attached_sas_addr[0],
- &properties.remote.sas_address.low,
- SAS_ADDR_SIZE / 2);
-
- memcpy(&isci_phy->sas_phy.attached_sas_addr[4],
- &properties.remote.sas_address.high,
- SAS_ADDR_SIZE / 2);
+ memcpy(&isci_phy->sas_phy.attached_sas_addr,
+ &attached_sas_address, sizeof(attached_sas_address));
} else if (properties.remote.protocols.u.bits.ssp_target ||
properties.remote.protocols.u.bits.smp_target) {