提交 7fcebda5 编写于 作者: B Borislav Petkov 提交者: Bartlomiej Zolnierkiewicz

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: NBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 90eb808e
...@@ -1143,9 +1143,6 @@ static ide_startstop_t cdrom_do_newpc_cont(ide_drive_t *drive) ...@@ -1143,9 +1143,6 @@ static ide_startstop_t cdrom_do_newpc_cont(ide_drive_t *drive)
{ {
struct request *rq = HWGROUP(drive)->rq; struct request *rq = HWGROUP(drive)->rq;
if (!rq->timeout)
rq->timeout = ATAPI_WAIT_PC;
return cdrom_transfer_packet_command(drive, rq, cdrom_newpc_intr); return cdrom_transfer_packet_command(drive, rq, cdrom_newpc_intr);
} }
...@@ -1242,6 +1239,10 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, ...@@ -1242,6 +1239,10 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
rq->cmd_type == REQ_TYPE_ATA_PC) { rq->cmd_type == REQ_TYPE_ATA_PC) {
xferlen = rq->data_len; xferlen = rq->data_len;
fn = cdrom_do_newpc_cont; fn = cdrom_do_newpc_cont;
if (!rq->timeout)
rq->timeout = ATAPI_WAIT_PC;
cdrom_do_block_pc(drive, rq); cdrom_do_block_pc(drive, rq);
} else if (blk_special_request(rq)) { } else if (blk_special_request(rq)) {
/* right now this can only be a reset... */ /* 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,8 +1257,6 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
return cdrom_start_packet_command(drive, xferlen, fn); return cdrom_start_packet_command(drive, xferlen, fn);
} }
/* /*
* Ioctl handling. * Ioctl handling.
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册