summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-05-01 23:27:11 +0200
committerBorislav Petkov <petkovbb@gmail.com>2009-05-15 06:44:06 +0200
commit5a0e43b5e2ee9a295f864c38f0e853b1a4fc3892 (patch)
tree9793191360addddb7d240e34d983817fde3ec621 /drivers/ide/ide-atapi.c
parentide-atapi: switch to rq->resid_len (diff)
downloadlinux-5a0e43b5e2ee9a295f864c38f0e853b1a4fc3892.tar.xz
linux-5a0e43b5e2ee9a295f864c38f0e853b1a4fc3892.zip
ide-atapi: add a len-parameter to ide_queue_pc_tail
This is in preparation for removing ide_atapi_pc. There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 1022e421abd8..0d4da2c1adc1 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(ide_init_pc);
* and wait for it to be serviced.
*/
int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
- struct ide_atapi_pc *pc)
+ struct ide_atapi_pc *pc, unsigned int bufflen)
{
struct request *rq;
int error;
@@ -93,8 +93,8 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
rq->cmd_type = REQ_TYPE_SPECIAL;
rq->special = (char *)pc;
- if (pc->req_xfer) {
- error = blk_rq_map_kern(drive->queue, rq, pc->buf, pc->req_xfer,
+ if (bufflen) {
+ error = blk_rq_map_kern(drive->queue, rq, pc->buf, bufflen,
GFP_NOIO);
if (error)
goto put_req;
@@ -117,7 +117,7 @@ int ide_do_test_unit_ready(ide_drive_t *drive, struct gendisk *disk)
ide_init_pc(&pc);
pc.c[0] = TEST_UNIT_READY;
- return ide_queue_pc_tail(drive, disk, &pc);
+ return ide_queue_pc_tail(drive, disk, &pc, 0);
}
EXPORT_SYMBOL_GPL(ide_do_test_unit_ready);
@@ -132,7 +132,7 @@ int ide_do_start_stop(ide_drive_t *drive, struct gendisk *disk, int start)
if (drive->media == ide_tape)
pc.flags |= PC_FLAG_WAIT_FOR_DSC;
- return ide_queue_pc_tail(drive, disk, &pc);
+ return ide_queue_pc_tail(drive, disk, &pc, 0);
}
EXPORT_SYMBOL_GPL(ide_do_start_stop);
@@ -147,7 +147,7 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on)
pc.c[0] = ALLOW_MEDIUM_REMOVAL;
pc.c[4] = on;
- return ide_queue_pc_tail(drive, disk, &pc);
+ return ide_queue_pc_tail(drive, disk, &pc, 0);
}
EXPORT_SYMBOL_GPL(ide_set_media_lock);