Date: Thu, 1 Sep 2005 00:54:01 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-hackers@freebsd.org Cc: Scott Long <scottl@samsco.org>, Eugene Grosbein <eugen@kuzbass.ru>, Ian Dowse <iedowse@iedowse.com>, freebsd-usb@freebsd.org, "Eygene A. Ryabinkin" <freebsd@rea.mbslab.kiae.ru> Subject: Re: Low umass performance with USB 2.0 ports Message-ID: <200509010054.02793.hselasky@c2i.net> In-Reply-To: <43161F60.8010408@samsco.org> References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <43161F60.8010408@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 31 August 2005 23:21, Scott Long wrote: > >> > >>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? > >> > >>Scott > > > > This is not documented in the EHCI chip specification. > > Flushing posted writes is something that all programmers of PCI devices > should understand, so it usually isn't documented in device manuals. > > > There exists the > > doorbell to ensure that the EHCI controller is finished with data > > structures. Also I have noticed that the existing EHCI driver does not > > always dequeue structures from the controller before accessing them. > > Can you point to an example here? In the official USB system, when an endpoint is opened, a QH structure is allocated and inserted into the USB controller's schedule. After that the EHCI driver will just write new values to that structure, while it is still scheduled. In my opinion you should unqueue this structure and wait for doorbell, before touching it. > > > If Scott's patch doesn't work, could you have tried to install the > > following (compiles on FreeBSD 5/6/7): > > Yeah, looks like my guess was wrong. > > Scott --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509010054.02793.hselasky>