summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pciide.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index b2ef4c98ec7..7af77659762 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.330 2011/05/09 22:33:54 matthew Exp $ */
+/* $OpenBSD: pciide.c,v 1.331 2011/07/11 17:10:37 jcs Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -2653,8 +2653,7 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
for (channel = 0; channel < sc->sc_wdcdev.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) &
@@ -2663,11 +2662,11 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
continue;
}
- /* PIIX are compat-only pciide devices */
- pciide_map_compat_intr(pa, cp, channel, 0);
+ pciide_map_compat_intr(pa, cp, channel, interface);
if (cp->hw_ok == 0)
continue;
- pciide_mapchan(pa, cp, 0, &cmdsize, &ctlsize, pciide_pci_intr);
+ pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize,
+ pciide_pci_intr);
if (cp->hw_ok == 0)
goto next;
if (pciide_chan_candisable(cp)) {
@@ -2681,7 +2680,7 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
sc->sc_wdcdev.set_modes(&cp->wdc_channel);
next:
if (cp->hw_ok == 0)
- pciide_unmap_compat_intr(pa, cp, channel, 0);
+ pciide_unmap_compat_intr(pa, cp, channel, interface);
}
piix_timing_debug(sc);