diff options
author | 2019-09-05 17:59:12 +0000 | |
---|---|---|
committer | 2019-09-05 17:59:12 +0000 | |
commit | 4a8b521cd99a7e959bc79ac13945c3c0384abad4 (patch) | |
tree | 0c307f136c68a1ecd10acd06fc759af440fa4414 | |
parent | Devices that have no quirks don't need to appear in the list of (diff) | |
download | wireguard-openbsd-4a8b521cd99a7e959bc79ac13945c3c0384abad4.tar.xz wireguard-openbsd-4a8b521cd99a7e959bc79ac13945c3c0384abad4.zip |
Supermicro X8DTH-i/6/iF/6F fails to attach uhci(4) via PCI and AHCI.
Result is a crash at power down. Skip the activate function if
attach has failed. Solution taken from ehci(4).
OK deraadt@ kettenis@
-rw-r--r-- | sys/dev/pci/uhci_pci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c index ecf629cbfa2..eef57159447 100644 --- a/sys/dev/pci/uhci_pci.c +++ b/sys/dev/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci_pci.c,v 1.33 2014/05/16 18:17:03 mpi Exp $ */ +/* $OpenBSD: uhci_pci.c,v 1.34 2019/09/05 17:59:12 bluhm Exp $ */ /* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */ /* @@ -86,6 +86,9 @@ uhci_pci_activate(struct device *self, int act) { struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; + if (sc->sc.sc_size == 0) + return 0; + /* On resume, set legacy support attribute and enable intrs */ switch (act) { case DVACT_RESUME: @@ -190,6 +193,7 @@ uhci_pci_attach(struct device *parent, struct device *self, void *aux) unmap_ret: bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); + sc->sc.sc_size = 0; splx(s); } @@ -218,6 +222,7 @@ uhci_pci_attach_deferred(struct device *self) unmap_ret: bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); pci_intr_disestablish(sc->sc_pc, sc->sc_ih); + sc->sc.sc_size = 0; splx(s); } |