Not add PIIX are wired to compat mode these days. Problem reported and fix

tested by Havard Eidnes.
This commit is contained in:
bouyer 2005-08-10 13:23:38 +00:00
parent c3766be38e
commit 13f098d5de
1 changed files with 6 additions and 6 deletions

View File

@ -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 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
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 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
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 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
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",