aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:46 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:46 +0100
commitb788ee9c6561fd9219a503216284d61036a0dc0b (patch)
treed83198a6c1a38661e60ac7454d1d82889c0472b3 /drivers/ide/ide-cd.c
parent2298169418f43ba5e0919762a4bab95a1227872a (diff)
downloadkernel_samsung_espresso10-b788ee9c6561fd9219a503216284d61036a0dc0b.zip
kernel_samsung_espresso10-b788ee9c6561fd9219a503216284d61036a0dc0b.tar.gz
kernel_samsung_espresso10-b788ee9c6561fd9219a503216284d61036a0dc0b.tar.bz2
ide: use do_rw_taskfile() for ATA_CMD_PACKET commands
* Pass command to ide_issue_pc() and update ->do_request methods in ide-{cd,floppy,tape}.c accordingly. * Convert ide_pktcmd_tf_load() to ide_init_packet_cmd() which just initializes command structure and use do_rw_taskfile() to load ATA_CMD_PACKET commands. While at it: * Rename ide{floppy,tape}_issue_pc() to ide_{floppy,tape}_issue_pc(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 2f698c6..a6c847d 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1066,6 +1066,8 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
sector_t block)
{
+ struct ide_cmd cmd;
+
ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu",
rq->cmd[0], (unsigned long long)block);
@@ -1094,7 +1096,14 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
return ide_stopped;
}
- return ide_issue_pc(drive);
+ memset(&cmd, 0, sizeof(cmd));
+
+ if (rq_data_dir(rq))
+ cmd.tf_flags |= IDE_TFLAG_WRITE;
+
+ cmd.rq = rq;
+
+ return ide_issue_pc(drive, &cmd);
}
/*