Low umass performance with USB 2.0 ports
Eygene A. Ryabinkin
freebsd at rea.mbslab.kiae.ru
Thu Sep 1 08:44:31 GMT 2005
> Actually, I just peeked inside the Linux EHCI code and it does a dummy
> read immediately after writing to the status register:
>
> /* clear (just) interrupts */
> writel (status, &ehci->regs->status);
> readl (&ehci->regs->command); /* unblock posted write */
>
> I wonder if that's the whole trick here. Would someone be willing to
> try the attached patch instead of the one that Ian posted?
Yes, that solved my problem. But the patch (for 5.x) uses different line
numbers:
-----
--- /sys/dev/usb/ehci.c.orig Thu Sep 1 10:59:51 2005
+++ /sys/dev/usb/ehci.c Thu Sep 1 10:48:59 2005
@@ -580,6 +580,7 @@
return (0);
EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */
+ EOREAD4(sc, EHCI_USBCMD); /* Flush posted writes on PCI */
sc->sc_bus.intr_context++;
sc->sc_bus.no_intrs++;
if (eintrs & EHCI_STS_IAA) {
-----
Apart from this the patch works: the writing process still spends much time
in the wdrain state, but no stalls occurs.
Just a remark: my USB 2.0 controller chip is made by NEC, not VIA.
For a FAT curiosity: FAT 32 gives 700K/sec and FAT 16 -- 3 Mb/sec.
--
rea
More information about the freebsd-hackers
mailing list