summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-03-06 17:13:12 +0000
committerthompsa <thompsa@FreeBSD.org>2009-03-06 17:13:12 +0000
commita2af9f1993054fa9f9c5ce415f8032558619467c (patch)
treec157090320f5caaec414d64bdd3affbcd0b04b80
parentcfbd0f43120b3f525e9fc31179c96b4f2d0a0c01 (diff)
downloadFreeBSD-src-a2af9f1993054fa9f9c5ce415f8032558619467c.zip
FreeBSD-src-a2af9f1993054fa9f9c5ce415f8032558619467c.tar.gz
MFp4 //depot/projects/usb@158692
Workaround a EHCI performance problem by issuing a doorbell after queueing a bulk xfer. Submitted by: Hans Petter Selasky
-rw-r--r--sys/dev/usb/controller/ehci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 9a5cace..cccd76a 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -2189,12 +2189,21 @@ static void
ehci_device_bulk_start(struct usb2_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
+ uint32_t temp;
/* setup TD's and QH */
ehci_setup_standard_chain(xfer, &sc->sc_async_p_last);
/* put transfer on interrupt queue */
ehci_transfer_intr_enqueue(xfer);
+
+ /* XXX Performance quirk: Some Host Controllers have a too low
+ * interrupt rate. Issue an IAAD to stimulate the Host
+ * Controller after queueing the BULK transfer.
+ */
+ temp = EOREAD4(sc, EHCI_USBCMD);
+ if (!(temp & EHCI_CMD_IAAD))
+ EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD);
}
struct usb2_pipe_methods ehci_device_bulk_methods =
OpenPOWER on IntegriCloud