mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]>
This commit is contained in:
parent
387750c3bf
commit
4c3032d8a4
38 changed files with 266 additions and 272 deletions
|
|
@ -258,8 +258,7 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
|
|||
|
||||
if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
|
||||
/* force an abort */
|
||||
hwif->OUTB(WIN_IDLEIMMEDIATE,
|
||||
hwif->io_ports[IDE_COMMAND_OFFSET]);
|
||||
hwif->OUTB(WIN_IDLEIMMEDIATE, hwif->io_ports.command_addr);
|
||||
|
||||
rq->errors++;
|
||||
|
||||
|
|
@ -410,9 +409,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
|
|||
idescsi_end_request (drive, 1, 0);
|
||||
return ide_stopped;
|
||||
}
|
||||
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]);
|
||||
bcount = (hwif->INB(hwif->io_ports.lbah_addr) << 8) |
|
||||
hwif->INB(hwif->io_ports.lbam_addr);
|
||||
ireason = hwif->INB(hwif->io_ports.nsect_addr);
|
||||
|
||||
if (ireason & CD) {
|
||||
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)
|
|||
"initiated yet DRQ isn't asserted\n");
|
||||
return startstop;
|
||||
}
|
||||
ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
|
||||
ireason = hwif->INB(hwif->io_ports.nsect_addr);
|
||||
if ((ireason & CD) == 0 || (ireason & IO)) {
|
||||
printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while "
|
||||
"issuing a packet command\n");
|
||||
|
|
@ -575,7 +574,7 @@ static ide_startstop_t idescsi_issue_pc(ide_drive_t *drive,
|
|||
return ide_started;
|
||||
} else {
|
||||
/* Issue the packet command */
|
||||
hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]);
|
||||
hwif->OUTB(WIN_PACKETCMD, hwif->io_ports.command_addr);
|
||||
return idescsi_transfer_pc(drive);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue