diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-18 18:00:42 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-04-18 18:00:42 -0400 |
commit | 5c4be57249e2e09136446597d2fe2a967c6ffef0 (patch) | |
tree | 02509609a80013e0e1e3d447ddc41805f014cc50 /include/linux/ide.h | |
parent | 6b544fcc8cd0a04eb42de9d1ecdd345e979d6ada (diff) |
ide-cd,atapi: use bio for internal commands
Impact: unify request data buffer handling
rq->data is used mostly to pass kernel buffer through request queue
without using bio. There are only a couple of places which still do
this in kernel and converting to bio isn't difficult.
This patch converts ide-cd and atapi to use bio instead of rq->data
for request sense and internal pc commands. With previous change to
unify sense request handling, this is relatively easily achieved by
adding blk_rq_map_kern() during sense_rq prep and PC issue.
If blk_rq_map_kern() fails for sense, the error is deferred till sense
issue and aborts the failed command which triggered the sense. Note
that this is a slim possibility as sense prep is done on each command
issue, so for the above condition to actually trigger, all preps since
the last sense issue till the issue of the request which would require
a sense should fail.
* do_request functions might sleep now. This should be okay as ide
request_fn - do_ide_request() - is invoked only from make_request
and plug work. Make sure this is the case by adding might_sleep()
to do_ide_request().
* Functions which access the read sense data before the sense request
is complete now should access bio_data(sense_rq->bio) as the sense
buffer might have been copied during blk_rq_map_kern().
* ide-tape updated to map sg.
* cdrom_do_block_pc() now doesn't have to deal with REQ_TYPE_ATA_PC
special case. Simplified.
* tp_ops->output/input_data path dropped from ide_pc_intr().
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 9e67ccac3c1f..1957461ac762 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1183,7 +1183,7 @@ void ide_create_request_sense_cmd(ide_drive_t *, struct ide_atapi_pc *); | |||
1183 | void ide_retry_pc(ide_drive_t *drive); | 1183 | void ide_retry_pc(ide_drive_t *drive); |
1184 | 1184 | ||
1185 | void ide_prep_sense(ide_drive_t *drive, struct request *rq); | 1185 | void ide_prep_sense(ide_drive_t *drive, struct request *rq); |
1186 | void ide_queue_sense_rq(ide_drive_t *drive, void *special); | 1186 | int ide_queue_sense_rq(ide_drive_t *drive, void *special); |
1187 | 1187 | ||
1188 | int ide_cd_expiry(ide_drive_t *); | 1188 | int ide_cd_expiry(ide_drive_t *); |
1189 | 1189 | ||