diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:26 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:26 -0400 |
commit | 23579a2a170265aacf78069f4817a41c1d6e9323 (patch) | |
tree | a20db3f337b64b13e482a2cb2f41e03b13d52e66 /drivers/scsi/ide-scsi.c | |
parent | 7616c0ad2087c7d244b8985390c63059a6223c45 (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.c | 15 |
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); | |||
275 | static ide_startstop_t | 275 | static ide_startstop_t |
276 | idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err) | 276 | idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err) |
277 | { | 277 | { |
278 | ide_hwif_t *hwif = drive->hwif; | ||
279 | |||
278 | if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT)) | 280 | if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT)) |
279 | /* force an abort */ | 281 | /* force an abort */ |
280 | HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG); | 282 | hwif->OUTB(WIN_IDLEIMMEDIATE, |
283 | hwif->io_ports[IDE_COMMAND_OFFSET]); | ||
281 | 284 | ||
282 | rq->errors++; | 285 | rq->errors++; |
283 | 286 | ||
@@ -423,9 +426,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | |||
423 | idescsi_end_request (drive, 1, 0); | 426 | idescsi_end_request (drive, 1, 0); |
424 | return ide_stopped; | 427 | return ide_stopped; |
425 | } | 428 | } |
426 | bcount = (hwif->INB(IDE_BCOUNTH_REG) << 8) | | 429 | bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) | |
427 | hwif->INB(IDE_BCOUNTL_REG); | 430 | hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]); |
428 | ireason = hwif->INB(IDE_IREASON_REG); | 431 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); |
429 | 432 | ||
430 | if (ireason & CD) { | 433 | if (ireason & CD) { |
431 | printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); | 434 | 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) | |||
497 | "initiated yet DRQ isn't asserted\n"); | 500 | "initiated yet DRQ isn't asserted\n"); |
498 | return startstop; | 501 | return startstop; |
499 | } | 502 | } |
500 | ireason = hwif->INB(IDE_IREASON_REG); | 503 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); |
501 | if ((ireason & CD) == 0 || (ireason & IO)) { | 504 | if ((ireason & CD) == 0 || (ireason & IO)) { |
502 | printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " | 505 | printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " |
503 | "issuing a packet command\n"); | 506 | "issuing a packet command\n"); |
@@ -587,7 +590,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) | |||
587 | return ide_started; | 590 | return ide_started; |
588 | } else { | 591 | } else { |
589 | /* Issue the packet command */ | 592 | /* Issue the packet command */ |
590 | HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); | 593 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]); |
591 | return idescsi_transfer_pc(drive); | 594 | return idescsi_transfer_pc(drive); |
592 | } | 595 | } |
593 | } | 596 | } |