aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_expander.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-01-19 21:43:08 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-29 16:33:39 -0500
commitc666aae6919114d6cff789d79f80cfa85f3a7339 (patch)
tree86cff11f3ed7482f6bb1a516f82bac24c7055835 /drivers/scsi/libsas/sas_expander.c
parent354cf82980e2449e71fdaa3c6f170357ebd65467 (diff)
[SCSI] libsas: delete device on sas address changed
If the phy is attached to a new sas address unregister the first address before processing the new attachment. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r--drivers/scsi/libsas/sas_expander.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 7e2d3c4c6171..d63f0fbcd103 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -2005,6 +2005,15 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
2005 return res; 2005 return res;
2006 } 2006 }
2007 2007
2008 /* delete the old link */
2009 if (SAS_ADDR(phy->attached_sas_addr) &&
2010 SAS_ADDR(sas_addr) != SAS_ADDR(phy->attached_sas_addr)) {
2011 SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
2012 SAS_ADDR(dev->sas_addr), phy_id,
2013 SAS_ADDR(phy->attached_sas_addr));
2014 sas_unregister_devs_sas_addr(dev, phy_id, last);
2015 }
2016
2008 return sas_discover_new(dev, phy_id); 2017 return sas_discover_new(dev, phy_id);
2009} 2018}
2010 2019