Subject: VIA VT8237A IDE Controller weirdness in pcidevs.h and viaide.c
To: None <>
From: Nino Dehne <>
List: current-users
Date: 12/22/2006 03:55:09

I recently got this new board, ASRock ALiveSATA2-GLAN with VIA K8T890 CF
and VIA VT8237A chips.

4.0_BETA2 and -current say:

viaide0 at pci0 dev 15 function 1
viaide0: VIA Technologies unknown VIA ATA controller
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at ioapic0 pin 14 (irq 14)

with the effect that hard disks only use DMA 2 instead of UltraDMA. So I
started digging to see if I could add support for it myself. What I found
was this:

# pcictl pci0 dump -d 15 -f 1
    Vendor Name: VIA Technologies (0x1106)
    Device Name: VT82C586A IDE Controller (0x0571)

In pcidevs.h:

#define	PCI_PRODUCT_VIATECH_VT82C586A_IDE 0x0571 /* VT82C586A IDE Controller */

It looks like this PCI ID is occupied by a much older device. Anyway, in

        case PCI_PRODUCT_VIATECH_VT8237:
            aprint_normal("VT8237 ATA133 controller\n");
            sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
            aprint_normal("unknown VIA ATA controller\n");
            sc->sc_wdcdev.sc_atac.atac_udma_cap = 0;

However, grepping for PCI_PRODUCT_VIATECH_VT8237 in pcidevs.h gives us:

#define PCI_PRODUCT_VIATECH_VT8237 0x3227 /* VT8237 (Apollo KT600) PCI-ISA Bridge */

I think there is something wrong with the pcidevs.h file. Why would viaide.c check
for an ISA bridge? Could someone please look at this?

Best regards,