diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2009-01-02 10:12:52 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-02 10:12:52 -0500 |
commit | 392de1d53dd40e2eebee3a0a26aa647a3865ca78 (patch) | |
tree | 6e904d52596b73d0f1ab343a4e84b0d8de5958fe /drivers/ide/ide-cd.c | |
parent | 4f02ff06b4d33aba50ce5157c23e99cd21d447ee (diff) |
ide-atapi: accomodate transfer length calculation for ide-cd
... by factoring it out of ide_cd_do_request() into a helper, as suggested by
Bart.
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
[bart: BLK_DEV_IDECD needs to select IDE_ATAPI now]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 65e5513758b0..8d3c7714682e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1214,8 +1214,9 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1214 | __func__, rq->cmd[0], rq->cmd_type, | 1214 | __func__, rq->cmd[0], rq->cmd_type, |
1215 | (unsigned long long)block); | 1215 | (unsigned long long)block); |
1216 | 1216 | ||
1217 | xferlen = ide_cd_get_xferlen(rq); | ||
1218 | |||
1217 | if (blk_fs_request(rq)) { | 1219 | if (blk_fs_request(rq)) { |
1218 | xferlen = 32768; | ||
1219 | fn = cdrom_start_rw_cont; | 1220 | fn = cdrom_start_rw_cont; |
1220 | 1221 | ||
1221 | if (cdrom_start_rw(drive, rq) == ide_stopped) | 1222 | if (cdrom_start_rw(drive, rq) == ide_stopped) |
@@ -1225,7 +1226,6 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1225 | return ide_stopped; | 1226 | return ide_stopped; |
1226 | } else if (blk_sense_request(rq) || blk_pc_request(rq) || | 1227 | } else if (blk_sense_request(rq) || blk_pc_request(rq) || |
1227 | rq->cmd_type == REQ_TYPE_ATA_PC) { | 1228 | rq->cmd_type == REQ_TYPE_ATA_PC) { |
1228 | xferlen = rq->data_len; | ||
1229 | fn = cdrom_do_newpc_cont; | 1229 | fn = cdrom_do_newpc_cont; |
1230 | 1230 | ||
1231 | if (!rq->timeout) | 1231 | if (!rq->timeout) |