diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:46 -0400 |
commit | b788ee9c6561fd9219a503216284d61036a0dc0b (patch) | |
tree | d83198a6c1a38661e60ac7454d1d82889c0472b3 /drivers/ide/ide-cd.c | |
parent | 2298169418f43ba5e0919762a4bab95a1227872a (diff) |
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.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 2f698c6e913f..a6c847d31b9d 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) | |||
1066 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | 1066 | static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, |
1067 | sector_t block) | 1067 | sector_t block) |
1068 | { | 1068 | { |
1069 | struct ide_cmd cmd; | ||
1070 | |||
1069 | ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu", | 1071 | ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu", |
1070 | rq->cmd[0], (unsigned long long)block); | 1072 | rq->cmd[0], (unsigned long long)block); |
1071 | 1073 | ||
@@ -1094,7 +1096,14 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1094 | return ide_stopped; | 1096 | return ide_stopped; |
1095 | } | 1097 | } |
1096 | 1098 | ||
1097 | return ide_issue_pc(drive); | 1099 | memset(&cmd, 0, sizeof(cmd)); |
1100 | |||
1101 | if (rq_data_dir(rq)) | ||
1102 | cmd.tf_flags |= IDE_TFLAG_WRITE; | ||
1103 | |||
1104 | cmd.rq = rq; | ||
1105 | |||
1106 | return ide_issue_pc(drive, &cmd); | ||
1098 | } | 1107 | } |
1099 | 1108 | ||
1100 | /* | 1109 | /* |