diff options
author | Chris Cappuccio <chris@cvs.openbsd.org> | 2000-01-17 17:12:35 +0000 |
---|---|---|
committer | Chris Cappuccio <chris@cvs.openbsd.org> | 2000-01-17 17:12:35 +0000 |
commit | f87ca1bd56b737cb12ae8c0871d3e804aa3c8ea4 (patch) | |
tree | ee68e1d0f92cfc14fb2e29d77a2b247635951d40 | |
parent | 6ad0b65fef3a425daa005531fe2806d1b4eade17 (diff) |
From Manuel Bouyer -
Don't set WDC_CAPABILITY_UDMA at all for SiS rev < 0xd0
-rw-r--r-- | sys/dev/pci/pciide.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index f2eed5537b9..66c57717bea 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.19 2000/01/11 01:16:00 chris Exp $ */ +/* $OpenBSD: pciide.c,v 1.20 2000/01/17 17:12:34 chris Exp $ */ /* $NetBSD: pciide.c,v 1.48 1999/11/28 20:05:18 bouyer Exp $ */ /* @@ -2197,14 +2197,18 @@ sis_chip_map(sc, pa) printf(": DMA"); pciide_mapreg_dma(sc, pa); - if (sc->sc_dma_ok) - sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA | WDC_CAPABILITY_UDMA; + if (sc->sc_dma_ok) { + sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA; + if (rev >= 0xd0) + sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA; + } sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_DATA32 | WDC_CAPABILITY_MODE; sc->sc_wdcdev.PIO_cap = 4; sc->sc_wdcdev.DMA_cap = 2; - sc->sc_wdcdev.UDMA_cap = (rev >= 0xd0) ? 2 : 0; + if (sc->sc_wdcdev.cap & WDC_CAPABILITY_UDMA) + sc->sc_wdcdev.UDMA_cap = 2; sc->sc_wdcdev.set_modes = sis_setup_channel; sc->sc_wdcdev.channels = sc->wdc_chanarray; sc->sc_wdcdev.nchannels = PCIIDE_NUM_CHANNELS; |