]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/libata-set-device-class-to-NONE-if-phys_offline
Revert "Move xen patchset to new version's subdir."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / libata-set-device-class-to-NONE-if-phys_offline
CommitLineData
00e5a55c
BS
1From 816ab89782ac139a8b65147cca990822bb7e8675 Mon Sep 17 00:00:00 2001
2From: Tejun Heo <tj@kernel.org>
3Date: Wed, 22 Oct 2008 00:31:34 +0900
4Subject: [PATCH] libata: set device class to NONE if phys_offline
5References: bnc#441420
6
7Reset methods don't have access to phys link status for slave links
8and may incorrectly indicate device presence causing unnecessary probe
9failures for unoccupied links. This patch clears device class to NONE
10during post-reset processing if phys link is offline.
11
12As on/offlineness semantics is strictly defined and used in multiple
13places by the core layer, this won't change behavior for drivers which
14don't use slave links.
15
16Signed-off-by: Tejun Heo <tj@kernel.org>
17Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
18Signed-off-by: Tejun Heo <teheo@suse.de>
19---
20 drivers/ata/libata-eh.c | 16 ++++++++--------
21 1 file changed, 8 insertions(+), 8 deletions(-)
22
23--- a/drivers/ata/libata-eh.c
24+++ b/drivers/ata/libata-eh.c
25@@ -2425,14 +2425,14 @@ int ata_eh_reset(struct ata_link *link,
26 dev->pio_mode = XFER_PIO_0;
27 dev->flags &= ~ATA_DFLAG_SLEEPING;
28
29- if (ata_phys_link_offline(ata_dev_phys_link(dev)))
30- continue;
31-
32- /* apply class override */
33- if (lflags & ATA_LFLAG_ASSUME_ATA)
34- classes[dev->devno] = ATA_DEV_ATA;
35- else if (lflags & ATA_LFLAG_ASSUME_SEMB)
36- classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
37+ if (!ata_phys_link_offline(ata_dev_phys_link(dev))) {
38+ /* apply class override */
39+ if (lflags & ATA_LFLAG_ASSUME_ATA)
40+ classes[dev->devno] = ATA_DEV_ATA;
41+ else if (lflags & ATA_LFLAG_ASSUME_SEMB)
42+ classes[dev->devno] = ATA_DEV_SEMB_UNSUP;
43+ } else
44+ classes[dev->devno] = ATA_DEV_NONE;
45 }
46
47 /* record current link speed */