* [PATCH 5/15] slc90e66: fix deadlock on error handling
@ 2007-10-01 21:34 Bartlomiej Zolnierkiewicz
2007-10-02 13:03 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-01 21:34 UTC (permalink / raw)
To: linux-ide
* 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 <bzolnier@gmail.com>
---
drivers/ide/pci/slc90e66.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: b/drivers/ide/pci/slc90e66.c
===================================================================
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -1,5 +1,5 @@
/*
- * linux/drivers/ide/pci/slc90e66.c Version 0.18 Aug 9, 2007
+ * linux/drivers/ide/pci/slc90e66.c Version 0.19 Sep 24, 2007
*
* Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com>
@@ -21,6 +21,8 @@
#include <asm/io.h>
+static DEFINE_SPINLOCK(slc90e66_lock);
+
static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
ide_hwif_t *hwif = HWIF(drive);
@@ -40,7 +42,7 @@ static void slc90e66_set_pio_mode(ide_dr
{ 2, 1 },
{ 2, 3 }, };
- spin_lock_irqsave(&ide_lock, flags);
+ spin_lock_irqsave(&slc90e66_lock, flags);
pci_read_config_word(dev, master_port, &master_data);
if (pio > 1)
@@ -71,7 +73,7 @@ static void slc90e66_set_pio_mode(ide_dr
pci_write_config_word(dev, master_port, master_data);
if (is_slave)
pci_write_config_byte(dev, slave_port, slave_data);
- spin_unlock_irqrestore(&ide_lock, flags);
+ spin_unlock_irqrestore(&slc90e66_lock, flags);
}
static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 5/15] slc90e66: fix deadlock on error handling
2007-10-01 21:34 [PATCH 5/15] slc90e66: fix deadlock on error handling Bartlomiej Zolnierkiewicz
@ 2007-10-02 13:03 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-10-02 13:03 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
Bartlomiej Zolnierkiewicz wrote:
> * 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.
... and in the piix as well. Since I failed to see what could lead to this
in the kernel.org code, I haven't carried the fix to slc90e66...
> * Bump driver version.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-02 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-01 21:34 [PATCH 5/15] slc90e66: fix deadlock on error handling Bartlomiej Zolnierkiewicz
2007-10-02 13:03 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).