diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 17:20:47 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 17:20:47 +0100 |
commit | 42cf2611b28602cf4c9dc7c22bc8653a10dff60d (patch) | |
tree | 2c10f114525ec76c5888cdc0d3a7a58481c995d3 /drivers/ide | |
parent | b46f205da647608a4064ce0a0acb07a8c74c6f23 (diff) |
ide: fix setting nIEN on idle devices
Fix do_ide_request() to operate on previous device / port instead of
the current one. The original code was wrong since at least Feb 2002
(2.4.0 timeframe).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-io.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c3cbe5a1e30..1d63159fc97 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -724,7 +724,9 @@ void do_ide_request(struct request_queue *q) spin_lock_irq(&hwgroup->lock); if (!ide_lock_hwgroup(hwgroup)) { + ide_hwif_t *prev_port; repeat: + prev_port = hwgroup->hwif; hwgroup->rq = NULL; if (drive->dev_flags & IDE_DFLAG_SLEEPING) { @@ -734,13 +736,13 @@ repeat: } } - if (hwif != hwgroup->hwif) { + if (hwif != prev_port) { /* - * set nIEN for previous hwif, drives in the + * set nIEN for previous port, drives in the * quirk_list may not like intr setups/cleanups */ - if (drive->quirk_list == 0) - hwif->tp_ops->set_irq(hwif, 0); + if (hwgroup->drive->quirk_list == 0) + prev_port->tp_ops->set_irq(prev_port, 0); } hwgroup->hwif = hwif; hwgroup->drive = drive; |