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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c8d0e8715997..396000208f81 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -542,7 +542,8 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
542 542
543 /* packet command */ 543 /* packet command */
544 spin_lock_irqsave(&ide_lock, flags); 544 spin_lock_irqsave(&ide_lock, flags);
545 hwif->OUTBSYNC(drive, WIN_PACKETCMD, IDE_COMMAND_REG); 545 hwif->OUTBSYNC(drive, WIN_PACKETCMD,
546 hwif->io_ports[IDE_COMMAND_OFFSET]);
546 ndelay(400); 547 ndelay(400);
547 spin_unlock_irqrestore(&ide_lock, flags); 548 spin_unlock_irqrestore(&ide_lock, flags);
548 549
@@ -992,6 +993,7 @@ static int cdrom_newpc_intr_dummy_cb(struct request *rq)
992 993
993static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) 994static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
994{ 995{
996 ide_hwif_t *hwif = drive->hwif;
995 struct cdrom_info *info = drive->driver_data; 997 struct cdrom_info *info = drive->driver_data;
996 struct request *rq = HWGROUP(drive)->rq; 998 struct request *rq = HWGROUP(drive)->rq;
997 xfer_func_t *xferfunc; 999 xfer_func_t *xferfunc;
@@ -1032,9 +1034,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
1032 /* 1034 /*
1033 * ok we fall to pio :/ 1035 * ok we fall to pio :/
1034 */ 1036 */
1035 ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3; 1037 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]) & 0x3;
1036 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG); 1038 lowcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
1037 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG); 1039 highcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]);
1038 1040
1039 len = lowcyl + (256 * highcyl); 1041 len = lowcyl + (256 * highcyl);
1040 1042