Red Hat Bugzilla – Bug 89743
usb-uhci Kernel freeze with one-shot interrupt transfers
Last modified: 2007-04-18 12:53:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314
Description of problem:
There is a bug introduced into usb-uhci.c which causes it to crash when being
used with a one-shot interrupt driver (as in my case the Lego IR Tower). The usb
developers would like to wait until 2.4.22 to apply the patch and would like to
see it applied for RedHat 9 first.
The patch is as follows:
--- /usr/src/linux-old/drivers/usb/usb-uhci.c 2003-04-27 13:16:19.000000000
+++ /usr/src/linux/drivers/usb/usb-uhci.c 2003-04-27 13:16:59.000000000 +0800
@@ -2515,6 +2515,7 @@
// correct toggle after unlink
usb_dotoggle (urb->dev, usb_pipeendpoint
(urb->pipe), usb_pipeout (urb->pipe));
clr_td_ioc(desc); // inactivate TD
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Use an interrupt usb device using a one-shot approach. e.g. Lego USB IR Tower
2. Use the driver the kernel will freeze
Actual Results: Kernel freezes
pete: opinion ?
The problem is real, but the solution is too conservative.
Also, we must not forget the companion usb-ohci fix.
I think we should ask Greg to fix it sooner.
Created attachment 91424 [details]
Better fix for usb-uhci
Created attachment 91425 [details]
Frode's fix for usb-ohci
re: new usb-uhci.c patch
Forgive me if this sounds stupid but doesn't this latest patch also have the
same problem? The issue is that the call uhci_clean_iso_step2(s, urb_priv); was
added recently. If anything, this needs to be changed/backed out. This method
deletes everything in urb_priv->desc_list which then causes a problem when you
reference it in *either*
for (i = 0; p != &urb_priv->desc_list; p = p->next, i++) *or* while ((p =
urb_priv->desc_list.next) != &urb_priv->desc_list)
This may be my poor coding skills but the two look the same to me. The "break"
statement basically prevented the for loop from executing which is why it worked.
I haven't tested your solution yet - but will do to confirm my suspicions.
OK - scratch last comment - it works for me and I think I can see why now.
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.
Just for the record, another such device is Visor Treo 90
(accordint to Streeter). The /proc/bus/usb/devices dump shows
some bulk endpoints though, I have no idea why the driver decides
to use interrupt endpoints.
> T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
> D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
> P: Vendor=082d ProdID=0200 Rev= 1.00
> C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 2mA
> I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=serial
> E: Ad=01(O) Atr=02(Bulk) MxPS= 8 Ivl=0ms
> E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
> E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms