[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>
This commit is contained in:
parent
3496343df5
commit
183ce896d7
1 changed files with 5 additions and 0 deletions
|
@ -244,6 +244,11 @@ static int sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req,
|
|||
* dev to host FIS as described in section G.5 of
|
||||
* sas-2 r 04b */
|
||||
dr = &((struct smp_resp *)disc_resp)->disc;
|
||||
if (memcmp(dev->sas_addr, dr->attached_sas_addr,
|
||||
SAS_ADDR_SIZE) == 0) {
|
||||
sas_printk("Found loopback topology, just ignore it!\n");
|
||||
return 0;
|
||||
}
|
||||
if (!(dr->attached_dev_type == 0 &&
|
||||
dr->attached_sata_dev))
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue