Commit 816ab897 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: set device class to NONE if phys_offline

Reset methods don't have access to phys link status for slave links
and may incorrectly indicate device presence causing unnecessary probe
failures for unoccupied links.  This patch clears device class to NONE
during post-reset processing if phys link is offline.

As on/offlineness semantics is strictly defined and used in multiple
places by the core layer, this won't change behavior for drivers which
don't use slave links.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent a568d1d2
...@@ -2455,14 +2455,14 @@ int ata_eh_reset(struct ata_link *link, int classify, ...@@ -2455,14 +2455,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
dev->pio_mode = XFER_PIO_0; dev->pio_mode = XFER_PIO_0;
dev->flags &= ~ATA_DFLAG_SLEEPING; dev->flags &= ~ATA_DFLAG_SLEEPING;
if (ata_phys_link_offline(ata_dev_phys_link(dev))) if (!ata_phys_link_offline(ata_dev_phys_link(dev))) {
continue; /* apply class override */
if (lflags & ATA_LFLAG_ASSUME_ATA)
/* apply class override */ classes[dev->devno] = ATA_DEV_ATA;
if (lflags & ATA_LFLAG_ASSUME_ATA) else if (lflags & ATA_LFLAG_ASSUME_SEMB)
classes[dev->devno] = ATA_DEV_ATA; classes[dev->devno] = ATA_DEV_SEMB_UNSUP;
else if (lflags & ATA_LFLAG_ASSUME_SEMB) } else
classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ classes[dev->devno] = ATA_DEV_NONE;
} }
/* record current link speed */ /* record current link speed */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment