From ec8b828fc4710eff245d9101b344e37051962882 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Tue, 11 Mar 2003 09:12:55 +0000 Subject: [PATCH] Make uhci_waitintr() robust to interrupts being enabled, even though it is expected that they will not be enabled at the time that it is called. This is reported to work around a problem in RELENG_4 where the kernel panics on boot if FAST_IPSEC and crypto support are enabled. Tested by: Scott Johnson --- sys/dev/usb/uhci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 4bb24a1fec64..34012f1bea80 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1511,11 +1511,10 @@ uhci_waitintr(uhci_softc_t *sc, usbd_xfer_handle xfer) for (; timo >= 0; timo--) { usb_delay_ms(&sc->sc_bus, 1); DPRINTFN(20,("uhci_waitintr: 0x%04x\n", UREAD2(sc, UHCI_STS))); - if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) { + if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) uhci_intr1(sc); - if (xfer->status != USBD_IN_PROGRESS) - return; - } + if (xfer->status != USBD_IN_PROGRESS) + return; } /* Timeout */