On Monday 04 October 2004 5:05 pm, Ga�l Roualland wrote: > > I first noticed the problem on 2.6.8.1, and could reproduce it on > 2.6.9-rc3. Detailled information gathered with kdb at the time of the > oops follows.
This looks like a known bug, fixed in bk-usb and hence 2.6.9-rc3-mm, by this patch. - Dave
This addresses an SMP-only issue with the EHCI driver, where only one CPU should scan the schedule at a time (scanning is not re-entrant) but either the IRQ handler or a watchdog timer could end up starting it. Many thanks to Olaf Hering for isolating the failure mode, and testing this fix! Once once CPU starts scanning, any other might as well finish right away. This fix just adds a flag to detect that case. Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- 1.93/drivers/usb/host/ehci-hcd.c Mon Aug 23 16:48:53 2004 +++ edited/ehci-hcd.c Thu Sep 2 16:05:47 2004 @@ -695,9 +695,18 @@ timer_action_done (ehci, TIMER_IO_WATCHDOG); if (ehci->reclaim_ready) end_unlink_async (ehci, regs); + + /* another CPU may drop ehci->lock during a schedule scan while + * it reports urb completions. this flag guards against bogus + * attempts at re-entrant schedule scanning. + */ + if (ehci->scanning) + return; + ehci->scanning = 1; scan_async (ehci, regs); if (ehci->next_uframe != -1) scan_periodic (ehci, regs); + ehci->scanning = 0; /* the IO watchdog guards against hardware or driver bugs that * misplace IRQs, and should let us run completely without IRQs. --- 1.43/drivers/usb/host/ehci.h Tue Aug 24 12:18:34 2004 +++ edited/ehci.h Thu Sep 2 15:32:30 2004 @@ -53,6 +53,7 @@ struct ehci_qh *async; struct ehci_qh *reclaim; unsigned reclaim_ready : 1; + unsigned scanning : 1; /* periodic schedule support */ #define DEFAULT_I_TDPS 1024 /* some HCs can do less */
