Bug 89743 - usb-uhci Kernel freeze with one-shot interrupt transfers
usb-uhci Kernel freeze with one-shot interrupt transfers
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-04-27 09:22 EDT by David Glance
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-14 14:09:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Better fix for usb-uhci (1023 bytes, patch)
2003-04-30 16:01 EDT, Pete Zaitcev
no flags Details | Diff
Frode's fix for usb-ohci (823 bytes, patch)
2003-04-30 16:36 EDT, Pete Zaitcev
no flags Details | Diff

  None (edit)
Description David Glance 2003-04-27 09:22:57 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
+                               break;

Version-Release number of selected component (if applicable):

How reproducible:

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

Additional info:
Comment 1 Arjan van de Ven 2003-04-29 14:10:13 EDT
pete: opinion ?
Comment 2 Pete Zaitcev 2003-04-29 15:41:38 EDT
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.
Comment 3 Pete Zaitcev 2003-04-30 16:01:08 EDT
Created attachment 91424 [details]
Better fix for usb-uhci
Comment 4 Pete Zaitcev 2003-04-30 16:36:59 EDT
Created attachment 91425 [details]
Frode's fix for usb-ohci
Comment 5 David Glance 2003-04-30 21:20:35 EDT
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.

Comment 6 David Glance 2003-05-01 08:33:47 EDT
OK - scratch last comment - it works for me and I think I can see why now.
Comment 7 Arjan van de Ven 2003-05-14 14:09:35 EDT
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.

Comment 8 Pete Zaitcev 2003-05-15 15:21:51 EDT
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

Note You need to log in before you can comment on or make changes to this bug.