Commit:     7f9ad9b8b96855f529f4fe9db0bf32cd3f14c01b
Parent:     ce2e0abbd31b047ac7be740d28ef710f5bbdb105
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 15 15:05:00 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 20:33:12 2007 -0500

    libata: ata_dev_disable() should be called from EH context
    ata_port_detach() calls ata_dev_disable() with host lock held but
    ata_dev_disable() should be called from EH context.  ata_port_detach()
    steals EH context by setting ATA_PFLAG_UNLOADAING and flushing EH.
    Drop locking around ata_dev_disable() and note that ata_port_detach()
    owns EH context at that point.
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/ata/libata-core.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 99a18ce..c316eac 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -7210,18 +7210,14 @@ static void ata_port_detach(struct ata_port *ap)
-       /* EH is now guaranteed to see UNLOADING, so no new device
-        * will be attached.  Disable all existing devices.
+       /* EH is now guaranteed to see UNLOADING - EH context belongs
+        * to us.  Disable all existing devices.
-       spin_lock_irqsave(ap->lock, flags);
        ata_port_for_each_link(link, ap) {
                ata_link_for_each_dev(dev, link)
-       spin_unlock_irqrestore(ap->lock, flags);
        /* Final freeze & EH.  All in-flight commands are aborted.  EH
         * will be skipped and retrials will be terminated with bad
         * target.
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