diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-all.h | 1 | ||||
-rw-r--r-- | sys/dev/ata/ata-chipset.c | 15 | ||||
-rw-r--r-- | sys/dev/ata/ata-pci.h | 1 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index 2f93a68..ff7d62f 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -135,7 +135,6 @@ #define ATA_BMCMD_START_STOP 0x01 #define ATA_BMCMD_WRITE_READ 0x08 -#define ATA_BMCTL_PORT 0x09 #define ATA_BMDEVSPEC_0 0x0a #define ATA_BMSTAT_PORT 0x0b #define ATA_BMSTAT_ACTIVE 0x01 diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index eeaeff7..daff30b 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -1196,6 +1196,7 @@ ata_promise_chipinit(device_t dev) } break; } + ctlr->setmode = ata_promise_setmode; return 0; } @@ -1212,8 +1213,8 @@ ata_promise_mio_allocate(device_t dev, struct ata_channel *ch) } ch->r_io[ATA_ALTSTAT].res = ctlr->r_io2; ch->r_io[ATA_ALTSTAT].offset = 0x238 + (ch->unit << 7); - ch->r_io[ATA_BMCTL_PORT].res = ctlr->r_io2; - ch->r_io[ATA_BMCTL_PORT].offset = 0x260 + (ch->unit << 7); + ch->r_io[ATA_BMCMD_PORT].res = ctlr->r_io2; + ch->r_io[ATA_BMCMD_PORT].offset = 0x260 + (ch->unit << 7); ch->r_io[ATA_BMDTP_PORT].res = ctlr->r_io2; ch->r_io[ATA_BMDTP_PORT].offset = 0x244 + (ch->unit << 7); ch->r_io[ATA_BMDEVSPEC_0].res = ctlr->r_io2; @@ -1357,7 +1358,7 @@ ata_promise_setmode(struct ata_device *atadev, int mode) case PRMIO: if (mode > ATA_UDMA2 && - (ATA_IDX_INL(atadev->channel, ATA_BMCTL_PORT) & 0x01000000)) { + (ATA_IDX_INL(atadev->channel, ATA_BMCMD_PORT) & 0x01000000)) { ata_prtdev(atadev, "DMA limited to UDMA33, non-ATA66 cable or device\n"); mode = ATA_UDMA2; @@ -1445,8 +1446,8 @@ static int ata_promise_mio_dmastart(struct ata_channel *ch) { ATA_IDX_OUTL(ch, ATA_BMDTP_PORT, ch->dma->mdmatab); - ATA_IDX_OUTL(ch, ATA_BMCTL_PORT, - (ATA_IDX_INL(ch, ATA_BMCTL_PORT) & ~0x000000c0) | + ATA_IDX_OUTL(ch, ATA_BMCMD_PORT, + (ATA_IDX_INL(ch, ATA_BMCMD_PORT) & ~0x000000c0) | ((ch->dma->flags & ATA_DMA_READ) ? 0x00000080 : 0x000000c0)); return 0; } @@ -1454,8 +1455,8 @@ ata_promise_mio_dmastart(struct ata_channel *ch) static int ata_promise_mio_dmastop(struct ata_channel *ch) { - ATA_IDX_OUTL(ch, ATA_BMCTL_PORT, - ATA_IDX_INL(ch, ATA_BMCTL_PORT) & ~0x00000080); + ATA_IDX_OUTL(ch, ATA_BMCMD_PORT, + ATA_IDX_INL(ch, ATA_BMCMD_PORT) & ~0x00000080); return 0; } diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index fc2a82c..48acb25 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -244,7 +244,6 @@ struct ata_pci_controller { #define PRNEW 1 #define PRTX 2 #define PRMIO 3 -#define PRIDX 4 #define PRTX4 0x01 #define PRSX4K 0x02 #define PRSX6K 0x04 |