aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:32 -0400
commit4c3032d8a4d6c97bd6e02bcab524ef2428d89561 (patch)
tree4528851a9b04282f602cebb6b2ab4bc677b63259 /drivers/scsi/ide-scsi.c
parent387750c3bf49c22f6189436032145e2131985076 (diff)
ide: add struct ide_io_ports (take 3)
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]` in ide_hwif_t. * Rename io_ports[] in hw_regs_t to io_ports_array[]. * Use un-named union for 'unsigned long io_ports_array[]' and 'struct ide_io_ports io_ports' in hw_regs_t. * Remove IDE_*_OFFSET defines. v2: * scc_pata.c build fix from Stephen Rothwell. v3: * Fix ctl_adrr typo in Sparc-specific part of ns87415.c. (Noticed by Andrew Morton) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 3638fa808ded..32553639aded 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -258,8 +258,7 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
258 258
259 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT)) 259 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
260 /* force an abort */ 260 /* force an abort */
261 hwif->OUTB(WIN_IDLEIMMEDIATE, 261 hwif->OUTB(WIN_IDLEIMMEDIATE, hwif->io_ports.command_addr);
262 hwif->io_ports[IDE_COMMAND_OFFSET]);
263 262
264 rq->errors++; 263 rq->errors++;
265 264
@@ -410,9 +409,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
410 idescsi_end_request (drive, 1, 0); 409 idescsi_end_request (drive, 1, 0);
411 return ide_stopped; 410 return ide_stopped;
412 } 411 }
413 bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) | 412 bcount = (hwif->INB(hwif->io_ports.lbah_addr) << 8) |
414 hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]); 413 hwif->INB(hwif->io_ports.lbam_addr);
415 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); 414 ireason = hwif->INB(hwif->io_ports.nsect_addr);
416 415
417 if (ireason & CD) { 416 if (ireason & CD) {
418 printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); 417 printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n");
@@ -485,7 +484,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
485 "initiated yet DRQ isn't asserted\n"); 484 "initiated yet DRQ isn't asserted\n");
486 return startstop; 485 return startstop;
487 } 486 }
488 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); 487 ireason = hwif->INB(hwif->io_ports.nsect_addr);
489 if ((ireason & CD) == 0 || (ireason & IO)) { 488 if ((ireason & CD) == 0 || (ireason & IO)) {
490 printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " 489 printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while "
491 "issuing a packet command\n"); 490 "issuing a packet command\n");
@@ -575,7 +574,7 @@ static ide_startstop_t idescsi_issue_pc(ide_drive_t *drive,
575 return ide_started; 574 return ide_started;
576 } else { 575 } else {
577 /* Issue the packet command */ 576 /* Issue the packet command */
578 hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]); 577 hwif->OUTB(WIN_PACKETCMD, hwif->io_ports.command_addr);
579 return idescsi_transfer_pc(drive); 578 return idescsi_transfer_pc(drive);
580 } 579 }
581} 580}