aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 82879a1a89e5..563a380d0e7a 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -895,10 +895,11 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
895 struct request *rq = HWGROUP(drive)->rq; 895 struct request *rq = HWGROUP(drive)->rq;
896 xfer_func_t *xferfunc; 896 xfer_func_t *xferfunc;
897 ide_expiry_t *expiry = NULL; 897 ide_expiry_t *expiry = NULL;
898 int dma_error = 0, dma, stat, ireason, len, thislen, uptodate = 0; 898 int dma_error = 0, dma, stat, thislen, uptodate = 0;
899 int write = (rq_data_dir(rq) == WRITE) ? 1 : 0; 899 int write = (rq_data_dir(rq) == WRITE) ? 1 : 0;
900 unsigned int timeout; 900 unsigned int timeout;
901 u8 lowcyl, highcyl; 901 u16 len;
902 u8 ireason;
902 903
903 /* check for errors */ 904 /* check for errors */
904 dma = info->dma; 905 dma = info->dma;
@@ -926,12 +927,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
926 goto end_request; 927 goto end_request;
927 } 928 }
928 929
929 /* ok we fall to pio :/ */ 930 ide_read_bcount_and_ireason(drive, &len, &ireason);
930 ireason = hwif->INB(hwif->io_ports.nsect_addr) & 0x3;
931 lowcyl = hwif->INB(hwif->io_ports.lbam_addr);
932 highcyl = hwif->INB(hwif->io_ports.lbah_addr);
933
934 len = lowcyl + (256 * highcyl);
935 931
936 thislen = blk_fs_request(rq) ? len : rq->data_len; 932 thislen = blk_fs_request(rq) ? len : rq->data_len;
937 if (thislen > len) 933 if (thislen > len)