aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-07-16 14:33:46 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:46 -0400
commit7fcebda501681080a242733b8db3f09f5ccb5d3f (patch)
tree163c4776d9d07ef88b7fb258946fd514e8c69fcd /drivers/ide/ide-cd.c
parent90eb808e0fd3cbda8a8b085238930c533f603642 (diff)
ide-cd: move request prep chunk from cdrom_do_newpc_cont to rq issue path
As a nice side effect, this minimizes the IRQ handler execution time. There should be no functionality change resulting from this patch. [bart: remove extra newlines from ide_cd_do_request()] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 9e593cebc00c..2b3c69d1f53f 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1143,9 +1143,6 @@ static ide_startstop_t cdrom_do_newpc_cont(ide_drive_t *drive)
1143{ 1143{
1144 struct request *rq = HWGROUP(drive)->rq; 1144 struct request *rq = HWGROUP(drive)->rq;
1145 1145
1146 if (!rq->timeout)
1147 rq->timeout = ATAPI_WAIT_PC;
1148
1149 return cdrom_transfer_packet_command(drive, rq, cdrom_newpc_intr); 1146 return cdrom_transfer_packet_command(drive, rq, cdrom_newpc_intr);
1150} 1147}
1151 1148
@@ -1242,6 +1239,10 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
1242 rq->cmd_type == REQ_TYPE_ATA_PC) { 1239 rq->cmd_type == REQ_TYPE_ATA_PC) {
1243 xferlen = rq->data_len; 1240 xferlen = rq->data_len;
1244 fn = cdrom_do_newpc_cont; 1241 fn = cdrom_do_newpc_cont;
1242
1243 if (!rq->timeout)
1244 rq->timeout = ATAPI_WAIT_PC;
1245
1245 cdrom_do_block_pc(drive, rq); 1246 cdrom_do_block_pc(drive, rq);
1246 } else if (blk_special_request(rq)) { 1247 } else if (blk_special_request(rq)) {
1247 /* right now this can only be a reset... */ 1248 /* right now this can only be a reset... */
@@ -1256,8 +1257,6 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
1256 return cdrom_start_packet_command(drive, xferlen, fn); 1257 return cdrom_start_packet_command(drive, xferlen, fn);
1257} 1258}
1258 1259
1259
1260
1261/* 1260/*
1262 * Ioctl handling. 1261 * Ioctl handling.
1263 * 1262 *