Hi _again_ I've got it this time :-)
On Monday 21 Feb 2005 22:24, Chris Clayton wrote: > On Sun, 20 Feb 2005 08:39:51 +0000 > > My word, I've put some hours into this, but I now have a 2.6.10 kernel > > with which the built-in USB port on my Compaq Armada 7400 works. So far > > that is, I want to do a bit more work on fine tuning the duration of the > > delays I have added to host/ohci-q.c::finish_unlinks() - 5 millseconds > > only works some of the time, 10 milliseconds seems to work all of the > > time. > > Mmm, spoke a bit too soon. Trying to find the sweet spot between 5 and 10 > millisecs, I'm currently at ...... 20 milliseconds. I had done some testing > yesterday, copying 5-6MB files to and from compact flash and over the > wireless network, and all was OK. However, tonight I've been copying a > kernel tarball around and getting timeouts again, so it looks like I've got > some more work to do. Sorry for the noise :) > The problem was that I had (foolishly) missed a couple of places where I needed to insert a delay. The good news is that having added the two additional delays, the duration of each of them (the new ones and the originals) now needs to be only 1 millisecond. Furthermore, the first delay we introduced (in core/message.c::usb_internal_control_msg() appears to be no longer needed. I've tried the fix with both 2.6.10 and 2.6.11-rc4 and it works fine. By that I mean that I can repeatedly copy a kernel tarball to/from compact flash and between machines on my wireless network without error. A USB mouse works perfectly too. All this is with the devices connected directly to the usb port or via an unpowered hub. Without the patch, I can't even connect the hub successfully. The patch for 2.6.11-rc4 follows. In case you think it is suitable for permananent inclusion in the kernel: Signed off by: Chris Clayton <[EMAIL PROTECTED]> --- linux-2.6.11-rc4/drivers/usb/host/ohci-q.c.orig 2005-02-13 03:07:40.000000000 +0000 +++ linux-2.6.11-rc4/drivers/usb/host/ohci-q.c 2005-02-23 21:16:16.000000000 +0000 @@ -1018,6 +1018,8 @@ if (ohci->ed_controltail) { command |= OHCI_CLF; + /* give old and slow silicon a little time */ + mdelay(1); if (!(ohci->hc_control & OHCI_CTRL_CLE)) { control |= OHCI_CTRL_CLE; ohci_writel (ohci, 0, @@ -1026,6 +1028,8 @@ } if (ohci->ed_bulktail) { command |= OHCI_BLF; + /* give old and slow silicon a little time */ + mdelay(1); if (!(ohci->hc_control & OHCI_CTRL_BLE)) { control |= OHCI_CTRL_BLE; ohci_writel (ohci, 0, @@ -1036,12 +1040,17 @@ /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ if (control) { ohci->hc_control |= control; + /* give old and slow silicon a little time */ + mdelay(1); ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); } - if (command) + if (command) { + /* give old and slow silicon a little time */ + mdelay(1); ohci_writel (ohci, command, &ohci->regs->cmdstatus); - } + } + } } ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel