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

    opti621: 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.
    
    * Bump driver version.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/opti621.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index 8d28f33..8953d9c 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/ide/pci/opti621.c            Version 0.8     Aug 27, 2007
+ *  linux/drivers/ide/pci/opti621.c            Version 0.9     Sep 24, 2007
  *
  *  Copyright (C) 1996-1998  Linus Torvalds & authors (see below)
  */
@@ -133,6 +133,8 @@ static int reg_base;
 #define PIO_NOT_EXIST 254
 #define PIO_DONT_KNOW 255
 
+static DEFINE_SPINLOCK(opti621_lock);
+
 /* there are stored pio numbers from other calls of opti621_set_pio_mode */
 static void compute_pios(ide_drive_t *drive, const u8 pio)
 /* Store values into drive->drive_data
@@ -278,7 +280,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
                second.recovery_time, drdy);
 #endif
 
-       spin_lock_irqsave(&ide_lock, flags);
+       spin_lock_irqsave(&opti621_lock, flags);
 
        reg_base = hwif->io_ports[IDE_DATA_OFFSET];
 
@@ -317,7 +319,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
        /*  and read prefetch for both drives */
        write_reg(misc, MISC_REG);
 
-       spin_unlock_irqrestore(&ide_lock, flags);
+       spin_unlock_irqrestore(&opti621_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