PERFORCE change 158692 for review

Hans Petter Selasky hselasky at FreeBSD.org
Wed Mar 4 14:06:14 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=158692

Change 158692 by hselasky at hselasky_laptop001 on 2009/03/04 22:05:57

	
	USB controller: EHCI performance quirk.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#2 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#2 (text+ko) ====

@@ -2189,12 +2189,23 @@
 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);
+
+	/* Performance quirk: Some Host Controllers have a too low
+	 * interrupt rate. Issue an IAAD to stimulate the Host
+	 * Controller after queueing the BULK transfer. Performance
+	 * increase seen using an off the shelf flash stick: 9
+	 * Mbytes/second. --hps
+	 */
+	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 =


More information about the p4-projects mailing list