Bug 1240 - USB HCD reports an unhandled IRQ and throws a call trace
Summary: USB HCD reports an unhandled IRQ and throws a call trace
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-15 15:01 UTC by Marek Habersack
Modified: 2004-12-02 14:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.0-test5-{mm1,mm2}
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
output of acpidmp (15.60 KB, application/octet-stream)
2003-09-15 15:02 UTC, Marek Habersack
Details
dmesg output (12.50 KB, text/plain)
2003-09-15 15:03 UTC, Marek Habersack
Details
dmidecode output (4.46 KB, text/plain)
2003-09-15 15:03 UTC, Marek Habersack
Details
a copy of /proc/interrupts (481 bytes, text/plain)
2003-09-15 15:04 UTC, Marek Habersack
Details
the kernel config (28.95 KB, text/plain)
2003-09-15 15:04 UTC, Marek Habersack
Details

Description Marek Habersack 2003-09-15 15:01:44 UTC
Distribution: Debian/Sid
Hardware Environment: http://www.maxdata.co.uk/produkte/Notebooks/MBook.asp
Software Environment:
Problem Description:

During the system bootup:

drivers/usb/host/uhci-hcd.c: USB Universal Host Controller Interface driver v2.1
uhci-hcd 0000:00:11.2: UHCI Host Controller
irq 9: nobody cared!
Call Trace:
 [<c010c71a>] __report_bad_irq+0x2a/0x90
 [<c010c810>] note_interrupt+0x70/0xa0
 [<c010caa0>] do_IRQ+0x120/0x130
 [<c0432800>] common_interrupt+0x18/0x20
 [<c0121f00>] do_softirq+0x40/0xa0
 [<c010ca7c>] do_IRQ+0xfc/0x130
 [<c0432800>] common_interrupt+0x18/0x20
 [<c0267b91>] pci_bus_write_config_word+0x61/0x90
 [<c03326cf>] uhci_reset+0x3f/0x60
 [<c0324ff5>] usb_hcd_pci_probe+0x195/0x4a0
 [<c026b952>] pci_device_probe_static+0x52/0x70
 [<c026b9ab>] __pci_device_probe+0x3b/0x50
 [<c026b9ec>] pci_device_probe+0x2c/0x50
 [<c02afc2f>] bus_match+0x3f/0x70
 [<c02afd7f>] driver_attach+0x6f/0xa0
 [<c02b001d>] bus_add_driver+0x8d/0xa0
 [<c02b045f>] driver_register+0x2f/0x40
 [<c026bbdf>] pci_register_driver+0x5f/0x90
 [<c0545684>] uhci_hcd_init+0xc4/0x140
 [<c053270b>] do_initcalls+0x2b/0xa0
 [<c012db3f>] init_workqueues+0xf/0x50
 [<c01070cd>] init+0x2d/0x160
 [<c01070a0>] init+0x0/0x160
 [<c0109089>] kernel_thread_helper+0x5/0xc

handlers:
[<c026eefb>] (acpi_irq+0x0/0x16)
Disabling IRQ #9
uhci-hcd 0000:00:11.2: irq 9, io base 0000d400
uhci-hcd 0000:00:11.2: new USB bus registered, assigned bus number 1

output of dmidecode, acpidump, dmesg, kernel config and a copy of
/proc/interrupts attached
Comment 1 Marek Habersack 2003-09-15 15:02:41 UTC
Created attachment 892 [details]
output of acpidmp
Comment 2 Marek Habersack 2003-09-15 15:03:37 UTC
Created attachment 893 [details]
dmesg output
Comment 3 Marek Habersack 2003-09-15 15:03:56 UTC
Created attachment 894 [details]
dmidecode output
Comment 4 Marek Habersack 2003-09-15 15:04:27 UTC
Created attachment 895 [details]
a copy of /proc/interrupts
Comment 5 Marek Habersack 2003-09-15 15:04:55 UTC
Created attachment 896 [details]
the kernel config
Comment 6 Luming Yu 2003-09-17 22:46:05 UTC
Would you please have patch at bug 1186 a try? thanks a lot.
Comment 7 Marek Habersack 2003-09-19 13:39:50 UTC
alas, the only difference is that now it is reporting IRQ 10 (that made the NIC
work, however)
Comment 8 TR 2003-09-21 16:51:27 UTC
Same problem observed (with or without the patch in bug-1186) only when uhci-hcd
is compiled as a module
Comment 9 Shaohua 2003-09-23 01:02:55 UTC
Somebody has made a patch for such problem, please try:

On Fri, Sep 19, 2003 at 09:36:49AM -0400, jtholmes wrote:
> I don't take the  Distribution, and don't need email copy of
> answer,  just  answer in LKML  and I will see it.
> 
> If I knew how to turn on more debugging I would gladly do so
> as I need to figure out the Kernel debugging scheme.
> 
> Problem  Description
> 
> 	After loading  Module uhci-hcd
> 
> 	USB Optical Mouse light shuts off and  irq 11:  is disabled.

Hm, can you apply this patch with -R and see if it fixes your problem?

thanks,

greg k-h


diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c	Fri Sep 19 12:13:36 2003
+++ b/drivers/usb/host/uhci-hcd.c	Fri Sep 19 12:13:36 2003
@@ -2143,6 +2143,20 @@
 #endif
 }
 
+static int uhci_reset(struct usb_hcd *hcd)
+{
+	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+	uhci->io_addr = (unsigned long) hcd->regs;
+
+	/* Maybe kick BIOS off this hardware.  Then reset, so we won't get
+	 * interrupts from any previous setup.
+	 */
+	pci_write_config_word(hcd->pdev, USBLEGSUP, USBLEGSUP_DEFAULT);
+	reset_hc(uhci);
+	return 0;
+}
+
 /*
  * Allocate a frame list, and then setup the skeleton
  *
@@ -2159,7 +2173,7 @@
  *  - The fourth queue is the bandwidth reclamation queue, which loops back
  *    to the high speed control queue.
  */
-static int __devinit uhci_start(struct usb_hcd *hcd)
+static int uhci_start(struct usb_hcd *hcd)
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	int retval = -EBUSY;
@@ -2171,7 +2185,6 @@
 	struct proc_dir_entry *ent;
 #endif
 
-	uhci->io_addr = (unsigned long) hcd->regs;
 	io_size = pci_resource_len(hcd->pdev, hcd->region);
 
 #ifdef CONFIG_PROC_FS
@@ -2188,10 +2201,6 @@
 	uhci->proc_entry = ent;
 #endif
 
-	/* Reset here so we don't get any interrupts from an old setup */
-	/*  or broken setup */
-	reset_hc(uhci);
-
 	uhci->fsbr = 0;
 	uhci->fsbrtimeout = 0;
 
@@ -2343,9 +2352,6 @@
 
 	init_stall_timer(hcd);
 
-	/* disable legacy emulation */
-	pci_write_config_word(hcd->pdev, USBLEGSUP, USBLEGSUP_DEFAULT);
-
 	udev->speed = USB_SPEED_FULL;
 
 	if (usb_register_root_hub(udev, &hcd->pdev->dev) != 0) {
@@ -2484,6 +2490,7 @@
 	.flags =		HCD_USB11,
 
 	/* Basic lifecycle operations */
+	.reset =		uhci_reset,
 	.start =		uhci_start,
 #ifdef CONFIG_PM
 	.suspend =		uhci_suspend,
Comment 10 Marek Habersack 2003-09-23 12:27:43 UTC
the last patch does the trick for test5-mm4
Comment 11 Len Brown 2003-10-22 15:22:54 UTC
The uhci_reset() fix here has been in 2.6 since 28th of August. 
Unknown if 2.4 has this same problem. 
 
 
 
Comment 12 David Brownell 2004-11-18 23:31:42 UTC
Another kernel parameter that can improve behavior here 
is "usb-handoff" to kick BIOS earlier. 
Comment 13 Andrew Morton 2004-11-29 16:40:48 UTC
Guys, is this problem now fixed in Linus's current tree?  Or does Greg
intend to mrege up that fix prior to 2.6.10?

Thanks.
Comment 14 Greg Kroah-Hartman 2004-12-02 14:49:08 UTC
This should be fixed in the latest kernel tree.

If not, please reopen it.

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