diff options
author | Scott Wood <scottwood@freescale.com> | 2013-04-17 21:27:27 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-04-17 21:27:27 (GMT) |
commit | 8da5cdaa7d6304f376b255c125e32a295da97954 (patch) | |
tree | 1f9f82555ad75ab977c53d7cb192c587b34bab18 /drivers/scsi | |
parent | c29142c0d3942e2c59ad3b9f780780e65f167d3a (diff) | |
parent | 2396403a0402caf7b9decbc5d206fa63ba62b6b7 (diff) | |
download | linux-fsl-qoriq-8da5cdaa7d6304f376b255c125e32a295da97954.tar.xz |
Merge tag 'v3.8.8'
This is the 3.8.8 stable release
Conflicts:
include/linux/preempt.h
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index aec2e0d..1924d8b 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -235,6 +235,17 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) linkrate = phy->linkrate; memcpy(sas_addr, phy->attached_sas_addr, SAS_ADDR_SIZE); + /* Handle vacant phy - rest of dr data is not valid so skip it */ + if (phy->phy_state == PHY_VACANT) { + memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); + phy->attached_dev_type = NO_DEVICE; + if (!test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) { + phy->phy_id = phy_id; + goto skip; + } else + goto out; + } + phy->attached_dev_type = to_dev_type(dr); if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) goto out; @@ -272,6 +283,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) phy->phy->maximum_linkrate = dr->pmax_linkrate; phy->phy->negotiated_linkrate = phy->linkrate; + skip: if (new_phy) if (sas_phy_add(phy->phy)) { sas_phy_free(phy->phy); |