[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200805272201.58035.bzolnier@gmail.com>
Date: Tue, 27 May 2008 22:01:57 +0200
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: linux-ide@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Borislav Petkov <petkovbb@...il.com>,
Jens Axboe <jens.axboe@...cle.com>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: [PATCH] ide: use __generic_unplug_device() in ide_do_drive_cmd() (take 2)
* Call __elv_add_request() with 'plug' == 1 (so the device will be
plugged) and then use __generic_unplug_device() instead of calling
ide_do_request() directly.
v2:
* For blk_pm_resume_request() requests the queue is stopped so we
need to call ->request_fn explicitly.
Thanks to:
- Rafael for reporting/bisecting the bug
- Borislav/Rafael for testing the fix
This is a preparation for converting IDE to use blk_execute_rq().
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: Borislav Petkov <petkovbb@...il.com>
Cc: Jens Axboe <jens.axboe@...cle.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
replacement patch
drivers/ide/ide-io.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1606,8 +1606,11 @@ int ide_do_drive_cmd (ide_drive_t *drive
spin_lock_irqsave(&ide_lock, flags);
if (action == ide_preempt)
hwgroup->rq = NULL;
- __elv_add_request(drive->queue, rq, where, 0);
- ide_do_request(hwgroup, IDE_NO_IRQ);
+ __elv_add_request(drive->queue, rq, where, 1);
+ __generic_unplug_device(drive->queue);
+ /* the queue is stopped so it won't be plugged+unplugged */
+ if (blk_pm_resume_request(rq))
+ do_ide_request(drive->queue);
spin_unlock_irqrestore(&ide_lock, flags);
err = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists