diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-12-28 23:08:07 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-12-28 23:08:07 +0000 |
commit | d50c198afa1c3b4d17a02f0f0e13e046422a278a (patch) | |
tree | 5e2dd4e4e89026b22007ee2408617a7ef6354810 | |
parent | f15425484be04e34b3302255b5412a05b3247df4 (diff) |
Ignore hotploug events while still in autoconf. Fixes problems with some
machines that get a spurious hotplug reove event when resetting their
onboard re(4).
-rw-r--r-- | sys/dev/pci/ppb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c index 47d47bf75e3..f5d98e8cbbe 100644 --- a/sys/dev/pci/ppb.c +++ b/sys/dev/pci/ppb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppb.c,v 1.27 2008/09/10 14:01:23 blambert Exp $ */ +/* $OpenBSD: ppb.c,v 1.28 2008/12/28 23:08:06 kettenis Exp $ */ /* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -202,6 +202,16 @@ ppb_intr(void *arg) struct ppb_softc *sc = arg; pcireg_t reg; + /* + * XXX ignore hotplug events while in autoconf. On some + * machines with onboard re(4), we gat a bogus hotplug remove + * event when we reset that device. Ignoring that event makes + * sure we will not try to forcibly detach re(4) when it isn't + * ready to deal with that. + */ + if (cold) + return (0); + reg = pci_conf_read(sc->sc_pc, sc->sc_tag, sc->sc_cap_off + PCI_PCIE_SLCSR); if (reg & PCI_PCIE_SLCSR_PDC) { |