aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2009-04-18 18:00:42 -0400
committerTejun Heo <tj@kernel.org>2009-04-18 18:00:42 -0400
commit6b544fcc8cd0a04eb42de9d1ecdd345e979d6ada (patch)
treef7c4d669de2c6ca01eecb97daf04dcef47faa916 /drivers/ide/ide-tape.c
parent746d5e43274e9ea6cbd58818afc9239d41fb4e1e (diff)
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>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index aadf53cfac6f..8324dfa78a3f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -695,7 +695,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
695 printk(KERN_ERR "ide-tape: %s: I/O error, ", 695 printk(KERN_ERR "ide-tape: %s: I/O error, ",
696 tape->name); 696 tape->name);
697 /* Retry operation */ 697 /* Retry operation */
698 ide_retry_pc(drive, tape->disk); 698 ide_retry_pc(drive);
699 return ide_stopped; 699 return ide_stopped;
700 } 700 }
701 pc->error = 0; 701 pc->error = 0;
@@ -752,7 +752,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
752 (unsigned long long)rq->sector, rq->nr_sectors, 752 (unsigned long long)rq->sector, rq->nr_sectors,
753 rq->current_nr_sectors); 753 rq->current_nr_sectors);
754 754
755 if (!blk_special_request(rq)) { 755 if (!(blk_special_request(rq) || blk_sense_request(rq))) {
756 /* We do not support buffer cache originated requests. */ 756 /* We do not support buffer cache originated requests. */
757 printk(KERN_NOTICE "ide-tape: %s: Unsupported request in " 757 printk(KERN_NOTICE "ide-tape: %s: Unsupported request in "
758 "request queue (%d)\n", drive->name, rq->cmd_type); 758 "request queue (%d)\n", drive->name, rq->cmd_type);
@@ -840,6 +840,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
840 BUG(); 840 BUG();
841 841
842out: 842out:
843 /* prepare sense request for this command */
844 ide_prep_sense(drive, rq);
845
843 memset(&cmd, 0, sizeof(cmd)); 846 memset(&cmd, 0, sizeof(cmd));
844 847
845 if (rq_data_dir(rq)) 848 if (rq_data_dir(rq))