Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Back out previous, it has to be done in a differ...



details:   https://anonhg.NetBSD.org/src/rev/e37b8ddbab0c
branches:  trunk
changeset: 494337:e37b8ddbab0c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Jul 05 19:05:31 2000 +0000

description:
Back out previous, it has to be done in a different way.

diffstat:

 sys/dev/pci/pciide.c |  41 ++++++++---------------------------------
 1 files changed, 8 insertions(+), 33 deletions(-)

diffs (63 lines):

diff -r 81818457e612 -r e37b8ddbab0c sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Wed Jul 05 18:58:41 2000 +0000
+++ b/sys/dev/pci/pciide.c      Wed Jul 05 19:05:31 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.76 2000/07/05 18:58:41 bouyer Exp $       */
+/*     $NetBSD: pciide.c,v 1.77 2000/07/05 19:05:31 bouyer Exp $       */
 
 
 /*
@@ -1713,46 +1713,21 @@
        struct pci_attach_args *pa;
 {
        struct pciide_channel *cp;
-       pcireg_t classreg, interface;
-       int channel, dmacap;
+       pcireg_t interface = PCI_INTERFACE(pa->pa_class);
+       int channel;
        pcireg_t chanenable;
        bus_size_t cmdsize, ctlsize;
 
        if (pciide_chipen(sc, pa) == 0)
                return;
-
-       classreg = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG);
-       interface = PCI_INTERFACE(classreg);
-
-
-#ifndef PCIIDE_AMD756_ENABLEDMA
-       /*
-        * The AMD756 chip revision D2 has a bug affecting DMA (but
-        * not UDMA) modes.  The workaround documented by AMD is to
-        * not use DMA on any drive which does not support UDMA modes,
-        * but this does not appear to be necessary on all drives.
-        * The bug, if triggered, will cause a total system hang.
-        *
-        * http://www.amd.com/products/cpg/athlon/techdocs/pdf/22591.pdf
-        */
-       if (AMD756_CHIPREV_DISABLEDMA(PCI_REVISION(classreg))) {
-               printf("%s: multi-word DMA disabled due to chip revision\n",
-                   sc->sc_wdcdev.sc_dev.dv_xname);
-               dmacap = 0;
-       } else
-#endif /* PCIIDE_AMD756_ENABLEDMA */
-       {
-               dmacap = WDC_CAPABILITY_DMA | WDC_CAPABILITY_UDMA;
-               printf("%s: bus-master DMA support present",
-                   sc->sc_wdcdev.sc_dev.dv_xname);
-               pciide_mapreg_dma(sc, pa);
-               printf("\n");
-       }
-
+       printf("%s: bus-master DMA support present",
+           sc->sc_wdcdev.sc_dev.dv_xname);
+       pciide_mapreg_dma(sc, pa);
+       printf("\n");
        sc->sc_wdcdev.cap = WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_DATA32 |
            WDC_CAPABILITY_MODE;
        if (sc->sc_dma_ok) {
-               sc->sc_wdcdev.cap |= dmacap;
+               sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA | WDC_CAPABILITY_UDMA;
                sc->sc_wdcdev.cap |= WDC_CAPABILITY_IRQACK;
                sc->sc_wdcdev.irqack = pciide_irqack;
        }



Home | Main Index | Thread Index | Old Index