summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:03:16 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:03:16 +0000
commit107d9634638a5d0a3a7f8d4141583c678334bb98 (patch)
treeff8b60ec28d54b43966be4fde895e4996fde3ef5
parentb44fa289544e62905e4b3bb511273a88990bf541 (diff)
from netbsd, ohci.c 1.142 1.147
log message for 1.142: Fix a done list handling bug which exhibits under high shared interrupt rate and bus traffic. As the interrupt register is read after checking hcca_done_head, there was a small chance of dropping a done list. Ignore OHCI_WDH interrupt bit if hcca_done_head is zero so that OHCI_WDH is processed later. log message for 1.147: Failure to properly mask off UE_DIR_IN from the endpoint address was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather interesting lossage.
-rw-r--r--sys/dev/usb/ohci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 12b65af3fba..ba7b1a1db5f 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.42 2004/08/11 04:01:41 dlg Exp $ */
+/* $OpenBSD: ohci.c,v 1.43 2004/08/11 04:03:15 dlg 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 $ */
@@ -1127,7 +1127,7 @@ ohci_intr1(ohci_softc_t *sc)
intrs |= OREAD4(sc, OHCI_INTERRUPT_STATUS);
sc->sc_hcca->hcca_done_head = 0;
} else
- intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS);
+ intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS) & ~OHCI_WDH;
if (!intrs)
return (0);
@@ -2066,7 +2066,7 @@ ohci_open(usbd_pipe_handle pipe)
}
sed->ed.ed_flags = htole32(
OHCI_ED_SET_FA(addr) |
- OHCI_ED_SET_EN(ed->bEndpointAddress) |
+ OHCI_ED_SET_EN(UE_GET_ADDR(ed->bEndpointAddress)) |
(dev->speed == USB_SPEED_LOW ? OHCI_ED_SPEED : 0) |
fmt | OHCI_ED_SET_MAXP(UGETW(ed->wMaxPacketSize)));
sed->ed.ed_headp = sed->ed.ed_tailp = htole32(tdphys);