diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2005-09-24 07:28:59 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2005-09-24 07:28:59 +0000 |
commit | 38c76b560c0736c6e91222638cd609ca7479f9b5 (patch) | |
tree | d5508ab3ca031b28a5811e499122a404deb33298 /sys/dev | |
parent | 16e8a3d99df48a8afc4e146d8bd0409189c0ca60 (diff) |
Force takeover of host ports after hibernate/resume, otherwise devices will
incorrectly attach to the companion controller.
Patch from Sebastiaan Indesteege on tech@
ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/ehci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index fb4a6331840..0b6392dfb7e 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.48 2005/04/11 08:09:32 dlg Exp $ */ +/* $OpenBSD: ehci.c,v 1.49 2005/09/24 07:28:58 pascoe Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -1048,9 +1048,11 @@ ehci_power(int why, void *v) } } - EOWRITE4(sc, EHCI_USBCMD, sc->sc_cmd); + /* Take over port ownership */ + EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); + for (i = 0; i < 100; i++) { hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; if (hcr != EHCI_STS_HCH) |