Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/pci Pull up revision 1.107 (requested by bouyer):



details:   https://anonhg.NetBSD.org/src/rev/32a12ba08001
branches:  netbsd-1-5
changeset: 490741:32a12ba08001
user:      he <he%NetBSD.org@localhost>
date:      Mon Feb 26 21:50:56 2001 +0000

description:
Pull up revision 1.107 (requested by bouyer):
  Disable Ultra-DMA on Ali controllers which don't support it.

diffstat:

 sys/dev/pci/pciide.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r f57af1857cd2 -r 32a12ba08001 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Mon Feb 26 21:49:16 2001 +0000
+++ b/sys/dev/pci/pciide.c      Mon Feb 26 21:50:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.68.2.20 2001/02/26 21:49:16 he Exp $      */
+/*     $NetBSD: pciide.c,v 1.68.2.21 2001/02/26 21:50:56 he Exp $      */
 
 
 /*
@@ -2778,6 +2778,7 @@
        int channel;
        pcireg_t cr, interface;
        bus_size_t cmdsize, ctlsize;
+       pcireg_t rev = PCI_REVISION(pa->pa_class);
 
        if (pciide_chipen(sc, pa) == 0)
                return;
@@ -2788,7 +2789,9 @@
        sc->sc_wdcdev.cap = WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_DATA32 |
            WDC_CAPABILITY_MODE;
        if (sc->sc_dma_ok) {
-               sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA | WDC_CAPABILITY_UDMA;
+               sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA;
+               if (rev >= 0x20)
+                       sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
                sc->sc_wdcdev.cap |= WDC_CAPABILITY_IRQACK;
                sc->sc_wdcdev.irqack = pciide_irqack;
        }



Home | Main Index | Thread Index | Old Index