ide-atapi: convert ide-{floppy,tape} to using preallocated sense buffer
Since we're issuing REQ_TYPE_SENSE now we need to allow those types of rqs in the ->do_request callbacks. As a future improvement, sense_len assignment might be unified across all ATAPI devices. Borislav to check with specs and test. As a result, get rid of ide_queue_pc_head() and drive->request_sense_rq. tj: * Init request sense ide_atapi_pc from sense request. In the longer timer, it would probably better to fold ide_create_request_sense_cmd() into its only current user - ide_floppy_get_format_progress(). * ide_retry_pc() no longer takes @disk. CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
这个提交包含在:
@@ -695,7 +695,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
|
||||
printk(KERN_ERR "ide-tape: %s: I/O error, ",
|
||||
tape->name);
|
||||
/* Retry operation */
|
||||
ide_retry_pc(drive, tape->disk);
|
||||
ide_retry_pc(drive);
|
||||
return ide_stopped;
|
||||
}
|
||||
pc->error = 0;
|
||||
@@ -752,7 +752,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
|
||||
(unsigned long long)rq->sector, rq->nr_sectors,
|
||||
rq->current_nr_sectors);
|
||||
|
||||
if (!blk_special_request(rq)) {
|
||||
if (!(blk_special_request(rq) || blk_sense_request(rq))) {
|
||||
/* We do not support buffer cache originated requests. */
|
||||
printk(KERN_NOTICE "ide-tape: %s: Unsupported request in "
|
||||
"request queue (%d)\n", drive->name, rq->cmd_type);
|
||||
@@ -840,6 +840,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
|
||||
BUG();
|
||||
|
||||
out:
|
||||
/* prepare sense request for this command */
|
||||
ide_prep_sense(drive, rq);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
|
||||
if (rq_data_dir(rq))
|
||||
|
在新工单中引用
屏蔽一个用户