diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2009-01-02 18:12:52 +0300 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-02 18:12:52 +0300 |
commit | 392de1d53dd40e2eebee3a0a26aa647a3865ca78 (patch) | |
tree | 6e904d52596b73d0f1ab343a4e84b0d8de5958fe /drivers/ide/ide-cd.c | |
parent | 4f02ff06b4d33aba50ce5157c23e99cd21d447ee (diff) | |
download | linux-392de1d53dd40e2eebee3a0a26aa647a3865ca78.tar.xz |
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, __func__, rq->cmd[0], rq->cmd_type, (unsigned long long)block); + xferlen = ide_cd_get_xferlen(rq); + if (blk_fs_request(rq)) { - xferlen = 32768; fn = cdrom_start_rw_cont; 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, return ide_stopped; } else if (blk_sense_request(rq) || blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) { - xferlen = rq->data_len; fn = cdrom_do_newpc_cont; if (!rq->timeout) |