diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-21 17:08:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-21 17:08:43 +0000 |
commit | 2416380fdc3a3b23f42e1db4ba0ebf207379a265 (patch) | |
tree | 9082c2ad48f3a91501392edb28c9d9b7c84a24c5 | |
parent | 6327c8f325bb4853f84f9fcd1a7bfd317d6a1256 (diff) |
if interrupt register is all 1s, we know we are dead; ok dlg
-rw-r--r-- | sys/dev/usb/ehci.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 4e1f730f8a0..501250fcdb8 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.95 2008/10/30 08:11:13 mglocker Exp $ */ +/* $OpenBSD: ehci.c,v 1.96 2008/11/21 17:08:42 deraadt Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -567,6 +567,10 @@ ehci_intr1(ehci_softc_t *sc) } intrs = EHCI_STS_INTRS(EOREAD4(sc, EHCI_USBSTS)); + if (intrs == 0xffffffff) { + sc->sc_dying = 1; + return (0); + } if (!intrs) return (0); diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 6a984bd2c6b..06e6de93025 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.88 2008/09/10 14:01:23 blambert Exp $ */ +/* $OpenBSD: ohci.c,v 1.89 2008/11/21 17:08:42 deraadt Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -1130,6 +1130,11 @@ ohci_intr1(ohci_softc_t *sc) } } + if (intrs == 0xffffffff) { + sc->sc_dying = 1; + return (0); + } + if (!intrs) return (0); diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 586eedbc6f5..8af21d8e618 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.68 2008/06/29 10:04:15 yuo Exp $ */ +/* $OpenBSD: uhci.c,v 1.69 2008/11/21 17:08:42 deraadt Exp $ */ /* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -1161,6 +1161,10 @@ uhci_intr1(uhci_softc_t *sc) status = UREAD2(sc, UHCI_STS) & UHCI_STS_ALLINTRS; if (status == 0) /* The interrupt was not for us. */ return (0); + if (status == 0xffffffff) { + sc->sc_dying = 1; + return (0); + } #ifdef UHCI_DEBUG if (uhcidebug > 15) { |