summaryrefslogtreecommitdiff
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 00:46:26 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 00:46:26 +0200
commit23579a2a170265aacf78069f4817a41c1d6e9323 (patch)
treea20db3f337b64b13e482a2cb2f41e03b13d52e66 /drivers/scsi/ide-scsi.c
parent7616c0ad2087c7d244b8985390c63059a6223c45 (diff)
ide: remove IDE_*_REG macros
* Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines. * Remove IDE_*_REG macros - this results in more readable and slightly smaller code. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 3c3b3502c4d4..7fea769cf291 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -275,9 +275,12 @@ static int idescsi_end_request(ide_drive_t *, int, int);
static ide_startstop_t
idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
{
+ ide_hwif_t *hwif = drive->hwif;
+
if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
/* force an abort */
- HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
+ hwif->OUTB(WIN_IDLEIMMEDIATE,
+ hwif->io_ports[IDE_COMMAND_OFFSET]);
rq->errors++;
@@ -423,9 +426,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
idescsi_end_request (drive, 1, 0);
return ide_stopped;
}
- bcount = (hwif->INB(IDE_BCOUNTH_REG) << 8) |
- hwif->INB(IDE_BCOUNTL_REG);
- ireason = hwif->INB(IDE_IREASON_REG);
+ bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) |
+ hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
+ ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
if (ireason & CD) {
printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n");
@@ -497,7 +500,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
"initiated yet DRQ isn't asserted\n");
return startstop;
}
- ireason = hwif->INB(IDE_IREASON_REG);
+ ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
if ((ireason & CD) == 0 || (ireason & IO)) {
printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while "
"issuing a packet command\n");
@@ -587,7 +590,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
return ide_started;
} else {
/* Issue the packet command */
- HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG);
+ hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]);
return idescsi_transfer_pc(drive);
}
}