diff options
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r-- | sys/dev/ata/ata-pci.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index dd1f15b..00fcb07 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -276,6 +276,13 @@ ata_pci_match(device_t dev) } return NULL; + case 0x00051103: + switch (pci_get_revid(dev)) { + case 0x01: + return "HighPoint HPT372 ATA133 controller"; + } + return NULL; + case 0x00081103: switch (pci_get_revid(dev)) { case 0x07: @@ -385,30 +392,23 @@ ata_pci_attach(device_t dev) ATA_OUTB(controller->bmio, 0x1f, ATA_INB(controller->bmio, 0x1f)|0x01); break; - case 0x00041103: /* HighPoint HPT 366/368/370/372 */ - case 0x00081103: /* HighPoint HPT 374 */ - switch (pci_get_revid(dev)) { - case 0x00: /* HPT 366 */ - case 0x01: + case 0x00041103: /* HighPoint HPT366/368/370/372 */ + if (pci_get_revid(dev) < 2) { /* HPT 366 */ /* turn off interrupt prediction */ pci_write_config(dev, 0x51, (pci_read_config(dev, 0x51, 1) & ~0x80), 1); break; - - case 0x02: /* HPT 368 */ - case 0x03: /* HPT 370 */ - case 0x04: - case 0x05: /* HPT 372 */ - case 0x07: /* HPT 374 */ - /* turn off interrupt prediction */ - pci_write_config(dev, 0x51, - (pci_read_config(dev, 0x51, 1) & ~0x03), 1); - pci_write_config(dev, 0x55, - (pci_read_config(dev, 0x55, 1) & ~0x03), 1); - /* turn on interrupts */ - pci_write_config(dev, 0x5a, - (pci_read_config(dev, 0x5a, 1) & ~0x10), 1); } + /* FALLTHROUGH */ + + case 0x00051103: /* HighPoint HPT372 */ + case 0x00081103: /* HighPoint HPT374 */ + /* turn off interrupt prediction */ + pci_write_config(dev, 0x51, (pci_read_config(dev, 0x51, 1) & ~0x03), 1); + pci_write_config(dev, 0x55, (pci_read_config(dev, 0x55, 1) & ~0x03), 1); + + /* turn on interrupts */ + pci_write_config(dev, 0x5a, (pci_read_config(dev, 0x5a, 1) & ~0x10), 1); break; case 0x05711106: /* VIA 82C586, '596, '686 default setup */ @@ -490,6 +490,7 @@ ata_pci_intr(struct ata_channel *ch) */ switch (ch->chiptype) { case 0x00041103: /* HighPoint HPT366/368/370/372 */ + case 0x00051103: /* HighPoint HPT372 */ case 0x00081103: /* HighPoint HPT374 */ if (((dmastat = ata_dmastatus(ch)) & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != ATA_BMSTAT_INTERRUPT) |