Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2047e15be4247efd430d067aae5bd24c11d99999
Commit:     2047e15be4247efd430d067aae5bd24c11d99999
Parent:     8562043606430185cad26d085d46adcc7ad67fd1
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

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

diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index 0973c85..10311ec 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -102,6 +102,8 @@ static void outReg (u8 data, u8 reg)
        outb_p(data, dataPort);
 }
 
+static DEFINE_SPINLOCK(ali14xx_lock);
+
 /*
  * Set PIO mode for the specified drive.
  * This function computes timing parameters
@@ -129,14 +131,14 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, 
const u8 pio)
 
        /* stuff timing parameters into controller registers */
        driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit;
-       spin_lock_irqsave(&ide_lock, flags);
+       spin_lock_irqsave(&ali14xx_lock, flags);
        outb_p(regOn, basePort);
        outReg(param1, regTab[driveNum].reg1);
        outReg(param2, regTab[driveNum].reg2);
        outReg(param3, regTab[driveNum].reg3);
        outReg(param4, regTab[driveNum].reg4);
        outb_p(regOff, basePort);
-       spin_unlock_irqrestore(&ide_lock, flags);
+       spin_unlock_irqrestore(&ali14xx_lock, flags);
 }
 
 /*
-
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