aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/phy.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-25 13:25:21 -0500
committerDan Williams <dan.j.williams@intel.com>2011-07-03 06:55:28 -0400
commit150fc6fc725055b400a8865e6785dc8dd0a2225d (patch)
tree800fe37980919606017c603c77d8d7384beaa7dc /drivers/scsi/isci/phy.c
parent7392d27580df2d14b5c3b1a1d7989c06457a819d (diff)
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/phy.c')
-rw-r--r--drivers/scsi/isci/phy.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index fbda570d25e1..1eefaaeb1141 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -75,14 +75,15 @@ void isci_phy_init(
75 struct isci_host *isci_host, 75 struct isci_host *isci_host,
76 int index) 76 int index)
77{ 77{
78 struct scic_sds_controller *controller = isci_host->core_controller; 78 struct scic_sds_controller *scic = isci_host->core_controller;
79 struct scic_sds_phy *scic_phy; 79 struct scic_sds_phy *scic_phy;
80 union scic_oem_parameters oem_parameters; 80 union scic_oem_parameters oem;
81 enum sci_status status = SCI_SUCCESS; 81 enum sci_status status = SCI_SUCCESS;
82 u64 sas_addr;
82 83
83 /*--------------- SCU_Phy Initialization Stuff -----------------------*/ 84 /*--------------- SCU_Phy Initialization Stuff -----------------------*/
84 85
85 status = scic_controller_get_phy_handle(controller, index, &scic_phy); 86 status = scic_controller_get_phy_handle(scic, index, &scic_phy);
86 if (status == SCI_SUCCESS) { 87 if (status == SCI_SUCCESS) {
87 sci_object_set_association(scic_phy, (void *)phy); 88 sci_object_set_association(scic_phy, (void *)phy);
88 phy->sci_phy_handle = scic_phy; 89 phy->sci_phy_handle = scic_phy;
@@ -90,24 +91,13 @@ void isci_phy_init(
90 dev_err(&isci_host->pdev->dev, 91 dev_err(&isci_host->pdev->dev,
91 "failed scic_controller_get_phy_handle\n"); 92 "failed scic_controller_get_phy_handle\n");
92 93
93 scic_oem_parameters_get(controller, &oem_parameters); 94 scic_oem_parameters_get(scic, &oem);
94 95 sas_addr = oem.sds1.phys[index].sas_address.high;
95 phy->sas_addr[0] = oem_parameters.sds1.phys[index].sas_address.low 96 sas_addr <<= 32;
96 & 0xFF; 97 sas_addr |= oem.sds1.phys[index].sas_address.low;
97 phy->sas_addr[1] = (oem_parameters.sds1.phys[index].sas_address.low 98 swab64s(&sas_addr);
98 >> 8) & 0xFF; 99
99 phy->sas_addr[2] = (oem_parameters.sds1.phys[index].sas_address.low 100 memcpy(phy->sas_addr, &sas_addr, sizeof(sas_addr));
100 >> 16) & 0xFF;
101 phy->sas_addr[3] = (oem_parameters.sds1.phys[index].sas_address.low
102 >> 24) & 0xFF;
103 phy->sas_addr[4] = oem_parameters.sds1.phys[index].sas_address.high
104 & 0xFF;
105 phy->sas_addr[5] = (oem_parameters.sds1.phys[index].sas_address.high
106 >> 8) & 0xFF;
107 phy->sas_addr[6] = (oem_parameters.sds1.phys[index].sas_address.high
108 >> 16) & 0xFF;
109 phy->sas_addr[7] = (oem_parameters.sds1.phys[index].sas_address.high
110 >> 24) & 0xFF;
111 101
112 phy->isci_port = NULL; 102 phy->isci_port = NULL;
113 phy->sas_phy.enabled = 0; 103 phy->sas_phy.enabled = 0;