diff options
author | Tejun Heo <tj@kernel.org> | 2008-10-21 11:31:34 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-10-22 20:42:43 -0400 |
commit | 816ab89782ac139a8b65147cca990822bb7e8675 (patch) | |
tree | 066f5e76a52f2cc5b6ad23c2606911dbe3af4921 /drivers/ata/libata-eh.c | |
parent | a568d1d2e2aff4f114b087c06bfd350e945ad6cf (diff) |
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: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 7ccd0ce0e7d4..5d687d7cffae 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2455,14 +2455,14 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2455 | dev->pio_mode = XFER_PIO_0; | 2455 | dev->pio_mode = XFER_PIO_0; |
2456 | dev->flags &= ~ATA_DFLAG_SLEEPING; | 2456 | dev->flags &= ~ATA_DFLAG_SLEEPING; |
2457 | 2457 | ||
2458 | if (ata_phys_link_offline(ata_dev_phys_link(dev))) | 2458 | if (!ata_phys_link_offline(ata_dev_phys_link(dev))) { |
2459 | continue; | 2459 | /* apply class override */ |
2460 | 2460 | if (lflags & ATA_LFLAG_ASSUME_ATA) | |
2461 | /* apply class override */ | 2461 | classes[dev->devno] = ATA_DEV_ATA; |
2462 | if (lflags & ATA_LFLAG_ASSUME_ATA) | 2462 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) |
2463 | classes[dev->devno] = ATA_DEV_ATA; | 2463 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; |
2464 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) | 2464 | } else |
2465 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ | 2465 | classes[dev->devno] = ATA_DEV_NONE; |
2466 | } | 2466 | } |
2467 | 2467 | ||
2468 | /* record current link speed */ | 2468 | /* record current link speed */ |