Oh my...
Begin forwarded message: Date: Wed, 7 Jun 2006 04:22:44 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Bugme-new] [Bug 6661] New: usb ehci-hcd, ehci_intr() function is using same variable for different things, which make if-cases fail. http://bugzilla.kernel.org/show_bug.cgi?id=6661 Summary: usb ehci-hcd, ehci_intr() function is using same variable for different things, which make if-cases fail. Kernel Version: 2.6.15.4 Status: NEW Severity: high Owner: [EMAIL PROTECTED] Submitter: [EMAIL PROTECTED] Most recent kernel where this bug did not occur: Haven't seen such :-) Distribution: kernel.org Hardware Environment: Intel XScale ixp465 (for the bug it's more of interest that it is a EHCI USB 2.0 controller) Software Environment: Linux kernel 2.6.15.4 Problem Description: In ehci-hcd.c there is a existing, even checked latest available 2.6.16.20, bug that can show up sometimes. Problem is that in the IRQ handler, the controller status is accuired in the beginning and stored in a variable called "status". This variable is later used for another controller status accuiring on another register, then yet later used as if it was the first variable. Solution is as simple as using another variable for the second status accuiring. A patch could be like: @@ -633,10 +637,11 @@ writel (status | CMD_RUN, &ehci->regs->command); while (i--) { - status = readl (&ehci->regs->port_status [i]); - if (status & PORT_OWNER) + int pstatus; + pstatus = readl (&ehci->regs->port_status [i]); + if (pstatus & PORT_OWNER) continue; - if (!(status & PORT_RESUME) + if (!(pstatus & PORT_RESUME) || ehci->reset_done [i] != 0) continue; Steps to reproduce: Bug is intermittent, one can see that code has been added trying to cope with problem caused by using same variable for different things. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel