aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libsas/sas_expander.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 75247a176c6b..caa0525d2523 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -245,7 +245,14 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp)
245 phy->attached_sata_ps = dr->attached_sata_ps; 245 phy->attached_sata_ps = dr->attached_sata_ps;
246 phy->attached_iproto = dr->iproto << 1; 246 phy->attached_iproto = dr->iproto << 1;
247 phy->attached_tproto = dr->tproto << 1; 247 phy->attached_tproto = dr->tproto << 1;
248 memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE); 248 /* help some expanders that fail to zero sas_address in the 'no
249 * device' case
250 */
251 if (phy->attached_dev_type == NO_DEVICE ||
252 phy->linkrate < SAS_LINK_RATE_1_5_GBPS)
253 memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
254 else
255 memcpy(phy->attached_sas_addr, dr->attached_sas_addr, SAS_ADDR_SIZE);
249 phy->attached_phy_id = dr->attached_phy_id; 256 phy->attached_phy_id = dr->attached_phy_id;
250 phy->phy_change_count = dr->change_count; 257 phy->phy_change_count = dr->change_count;
251 phy->routing_attr = dr->routing_attr; 258 phy->routing_attr = dr->routing_attr;