Subject: PCI device identification
To: None <>
From: Matthias Scheler <>
List: tech-kern
Date: 10/13/2001 22:17:10

I've got a SiS 735 chipset based motherboard which supports Ultra DMA mode 5.
But our current PCI IDE only allows Ultra DMA mode 2 for this chipset. It is
easy to change this with the following fix:

Index: pciide.c
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide.c,v
retrieving revision 1.129
diff -u -r1.129 pciide.c
--- pciide.c    2001/09/24 20:03:47     1.129
+++ pciide.c    2001/10/13 22:11:35
@@ -2782,7 +2782,7 @@
        sc->sc_wdcdev.PIO_cap = 4;
        sc->sc_wdcdev.DMA_cap = 2;
        if (sc->sc_wdcdev.cap & WDC_CAPABILITY_UDMA)
-               sc->sc_wdcdev.UDMA_cap = 2;
+               sc->sc_wdcdev.UDMA_cap = 5;
        sc->sc_wdcdev.set_modes = sis_setup_channel;
        sc->sc_wdcdev.channels = sc->wdc_chanarray;

But this fix will most likely cause problems on older SiS chipsets. The
best chance to recognize the 735 chipset is problay the host bridge:

pchb0 at pci0 dev 0 function 0
pchb0: Silicon Integrated System SiS 735 Host Bridge (rev. 0x01)

But how do I get its version number for the IDE driver? The IDE hostadapter
is not on the same PCI device:

pciide0 at pci0 dev 2 function 5: Silicon Integrated System 5597/5598 IDE controller (rev. 0xd0)
pciide0: bus-master DMA support present

There are some more functions on that device but I don't think they can
be used for identification:

pcib0 at pci0 dev 2 function 0
pcib0: Silicon Integrated System 85C503 or 5597/5598 ISA bridge (rev. 0x00)
ohci0 at pci0 dev 2 function 2: Silicon Integrated System 5597/5598 USB host controller (rev. 0x07)
ohci1 at pci0 dev 2 function 3: Silicon Integrated System 5597/5598 USB host controller (rev. 0x07)

So how do I find the host bridge?

	Kind regards

Matthias Scheler