Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a34a8751f312bd4674d48d63556efa8f0e3a1021
Commit:     a34a8751f312bd4674d48d63556efa8f0e3a1021
Parent:     2047e15be4247efd430d067aae5bd24c11d99999
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 20 00:32:35 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Oct 20 00:32:35 2007 +0200

    dtc2278: fix deadlock on error handling
    
    Stop abusing ide_lock lock (switch to a private locking).
    
    Fixes same issue as fixed by Alan Cox in atiixp host driver with
    commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/legacy/dtc2278.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 253a20f..acd7283 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -67,18 +67,20 @@ static void sub22 (char b, char c)
        }
 }
 
+static DEFINE_SPINLOCK(dtc2278_lock);
+
 static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio)
 {
        unsigned long flags;
 
        if (pio >= 3) {
-               spin_lock_irqsave(&ide_lock, flags);
+               spin_lock_irqsave(&dtc2278_lock, flags);
                /*
                 * This enables PIO mode4 (3?) on the first interface
                 */
                sub22(1,0xc3);
                sub22(0,0xa0);
-               spin_unlock_irqrestore(&ide_lock, flags);
+               spin_unlock_irqrestore(&dtc2278_lock, flags);
        } else {
                /* we don't know how to set it back again.. */
        }
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to