Commit:     4ccd3329a2e51473a86547a55f9e5f98f8f65b33
Parent:     2695e36616c3ece5e8e30666868fc7c90dc3fc75
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 8 20:26:12 2008 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu Jan 10 16:53:22 2008 -0500

    libata: don't normalize UNKNOWN to NONE after reset
    After non-classifying reset, ehc->classes[] could contain
    ATA_DEV_UNKNOWN which used to be normalized to ATA_DEV_NONE for
    consistency.  However, this causes unfortunate side effect for drivers
    which have non-classifying hardresets (e.g. sata_nv) by making
    hardreset report ATA_DEV_NONE for non-classifying resets and thus
    makes EH believe that the port is unoccupied and recovery can be
    skipped.  The end result is that after a device is swapped with
    another one, the new device isn't attached after the old one is
    This patch makes ata_eh_reset() not normalize UNKNOWN to NONE after
    non-classifying resets.  This fixes the above problem.  As UNKNOWN and
    NONE are handled differently by only EH hotplug logic, this doesn't
    cause other behavior changes.
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Cc: Robert Hancock <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/ata/libata-eh.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 74269ed..21a81cd 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2167,13 +2167,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
                if (ata_link_offline(link))
-               /* apply class override and convert UNKNOWN to NONE */
+               /* apply class override */
                if (lflags & ATA_LFLAG_ASSUME_ATA)
                        classes[dev->devno] = ATA_DEV_ATA;
                else if (lflags & ATA_LFLAG_ASSUME_SEMB)
                        classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
-               else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
-                       classes[dev->devno] = ATA_DEV_NONE;
        /* record current link speed */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to