[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1213252870-20474-11-git-send-email-petkovbb@gmail.com>
Date: Thu, 12 Jun 2008 08:41:02 +0200
From: Borislav Petkov <petkovbb@...glemail.com>
To: <bzolnier@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org,
Borislav Petkov <petkovbb@...il.com>
Subject: [PATCH 10/18] ide-cd: move request prep from cdrom_start_seek_continuation to rq issue path
... by factoring out the rq preparation code into a separate
function called in the request routine. Bart: As a nice
side effect, this minimizes the IRQ handler execution time.
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@...il.com>
---
drivers/ide/ide-cd.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index b8c98e1..da0f28c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -763,9 +763,8 @@ static ide_startstop_t cdrom_seek_intr(ide_drive_t *drive)
return ide_stopped;
}
-static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive)
+static void ide_cd_prepare_seek_request(ide_drive_t *drive, struct request *rq)
{
- struct request *rq = HWGROUP(drive)->rq;
sector_t frame = rq->sector;
sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS);
@@ -775,6 +774,11 @@ static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive)
put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]);
rq->timeout = ATAPI_WAIT_PC;
+}
+
+static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive)
+{
+ struct request *rq = HWGROUP(drive)->rq;
return cdrom_transfer_packet_command(drive, rq, &cdrom_seek_intr);
}
@@ -1223,10 +1227,14 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
IDE_LARGE_SEEK(info->last_block, block,
IDECD_SEEK_THRESHOLD) &&
drive->dsc_overlap) {
+
xferlen = 0;
fn = cdrom_start_seek_continuation;
info->dma = 0;
info->start_seek = jiffies;
+
+ ide_cd_prepare_seek_request(drive, rq);
+
} else {
xferlen = 32768;
fn = cdrom_start_rw_cont;
--
1.5.5.1
--
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