Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Not add PIIX are wired to compat mode these days...



details:   https://anonhg.NetBSD.org/src/rev/578fb1471f4c
branches:  trunk
changeset: 583523:578fb1471f4c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Aug 10 13:23:38 2005 +0000

description:
Not add PIIX are wired to compat mode these days. Problem reported and fix
tested by Havard Eidnes.

diffstat:

 sys/dev/pci/piixide.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 20806798be58 -r 578fb1471f4c sys/dev/pci/piixide.c
--- a/sys/dev/pci/piixide.c     Wed Aug 10 13:20:42 2005 +0000
+++ b/sys/dev/pci/piixide.c     Wed Aug 10 13:23:38 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: piixide.c,v 1.23 2005/07/21 07:09:31 tron Exp $        */
+/*     $NetBSD: piixide.c,v 1.24 2005/08/10 13:23:38 bouyer Exp $      */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: piixide.c,v 1.23 2005/07/21 07:09:31 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: piixide.c,v 1.24 2005/08/10 13:23:38 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -246,6 +246,7 @@
        int channel;
        u_int32_t idetim;
        bus_size_t cmdsize, ctlsize;
+       pcireg_t interface = PCI_INTERFACE(pa->pa_class);
 
        if (pciide_chipen(sc, pa) == 0)
                return;
@@ -341,8 +342,7 @@
        for (channel = 0; channel < sc->sc_wdcdev.sc_atac.atac_nchannels;
             channel++) {
                cp = &sc->pciide_channels[channel];
-               /* PIIX is compat-only */
-               if (pciide_chansetup(sc, channel, 0) == 0)
+               if (pciide_chansetup(sc, channel, interface) == 0)
                        continue;
                idetim = pci_conf_read(sc->sc_pc, sc->sc_tag, PIIX_IDETIM);
                if ((PIIX_IDETIM_READ(idetim, channel) &
@@ -365,8 +365,8 @@
                            channel, idetim, interface);
 #endif
                }
-               /* PIIX are compat-only pciide devices */
-               pciide_mapchan(pa, cp, 0, &cmdsize, &ctlsize, pciide_pci_intr);
+               pciide_mapchan(pa, cp, interface,
+                   &cmdsize, &ctlsize, pciide_pci_intr);
        }
 
        ATADEBUG_PRINT(("piix_setup_chip: idetim=0x%x",



Home | Main Index | Thread Index | Old Index