From cdecdf20d199001404750f145830b035f471f125 Mon Sep 17 00:00:00 2001 From: Chris Cappuccio Date: Mon, 10 Jan 2000 23:28:36 +0000 Subject: Don't enable UDMA modes for revisions of SiS 5513 < 0xd0 The only revisions I know which don't actually support UDMA are 0x09 and below.. But the only revision I know which does support UDMA is 0xd0 (and presumably above that) --- sys/dev/pci/pciide.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 03c839a880c..b21751f9117 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.16 2000/01/10 22:54:45 chris Exp $ */ +/* $OpenBSD: pciide.c,v 1.17 2000/01/10 23:28:35 chris Exp $ */ /* $NetBSD: pciide.c,v 1.48 1999/11/28 20:05:18 bouyer Exp $ */ /* @@ -2184,6 +2184,7 @@ sis_chip_map(sc, pa) { struct pciide_channel *cp; int channel; + u_int32_t rev; u_int8_t sis_ctr0 = pciide_pci_read(sc->sc_pc, sc->sc_tag, SIS_CTRL0); pcireg_t interface = PCI_INTERFACE(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG)); @@ -2202,7 +2203,10 @@ sis_chip_map(sc, pa) WDC_CAPABILITY_MODE; sc->sc_wdcdev.PIO_cap = 4; sc->sc_wdcdev.DMA_cap = 2; - sc->sc_wdcdev.UDMA_cap = 2; + + rev = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG) & PCI_REVISION_MASK; + sc->sc_wdcdev.UDMA_cap = (rev >= 0xd0) ? 2 : 0; + sc->sc_wdcdev.set_modes = sis_setup_channel; sc->sc_wdcdev.channels = sc->wdc_chanarray; sc->sc_wdcdev.nchannels = PCIIDE_NUM_CHANNELS; -- cgit v1.2.3