aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_expander.c
diff options
context:
space:
mode:
authorjack_wang <jack_wang@usish.com>2011-02-19 05:20:53 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-28 12:40:34 -0500
commit183ce896d726fb987da589fa8e36fb7214a494cc (patch)
tree741d899331336f132274ba2fb116211725d398a2 /drivers/scsi/libsas/sas_expander.c
parent3496343df5062d36354a106f19c9688a6ecf9734 (diff)
[SCSI] libsas: fix loopback topology bug during discovery
In some test envirenment, there is loopback topology test. We should handle this during discovery. Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r--drivers/scsi/libsas/sas_expander.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 505ffe35829..f3f693b772a 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -244,6 +244,11 @@ static int sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req,
244 * dev to host FIS as described in section G.5 of 244 * dev to host FIS as described in section G.5 of
245 * sas-2 r 04b */ 245 * sas-2 r 04b */
246 dr = &((struct smp_resp *)disc_resp)->disc; 246 dr = &((struct smp_resp *)disc_resp)->disc;
247 if (memcmp(dev->sas_addr, dr->attached_sas_addr,
248 SAS_ADDR_SIZE) == 0) {
249 sas_printk("Found loopback topology, just ignore it!\n");
250 return 0;
251 }
247 if (!(dr->attached_dev_type == 0 && 252 if (!(dr->attached_dev_type == 0 &&
248 dr->attached_sata_dev)) 253 dr->attached_sata_dev))
249 break; 254 break;