diff --git a/sys/dev/pci/piixide.c b/sys/dev/pci/piixide.c index 1f6a05d140db..772dce212ff7 100644 --- a/sys/dev/pci/piixide.c +++ b/sys/dev/pci/piixide.c @@ -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 -__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 #include @@ -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",