On Thu, 4 Nov 2010, Maksim Rayskiy wrote: > Hello, > > I am running into a crash on 2.6.36-rc7 kernel when I am bringing ohci > controller out of suspend. Our suspend gates the clocks, so any access to > the ohci registers becomes a bus error. > I tracked the crash down to hcd polling function running off the timer. And > it happens _before_ pm core calls our ohci resume method. > > #1 0x80310b84 in ohci_hub_status_data (hcd=<value optimized out>, > buf=<value optimized out>) > at drivers/usb/host/ohci-hub.c:520 > #2 0x802f11a0 in usb_hcd_poll_rh_status (hcd=<value optimized out>) at > drivers/usb/core/hcd.c:675 > #3 0x8003faec in call_timer_fn (h=<value optimized out>) at > kernel/timer.c:1057 > #4 __run_timers (h=<value optimized out>) at kernel/timer.c:1118 > #5 run_timer_softirq (h=<value optimized out>) at kernel/timer.c:1297 > #6 0x80038ff0 in __do_softirq () at kernel/softirq.c:219 > #7 0x80039140 in do_softirq () at kernel/softirq.c:266 > #8 0x800392d8 in irq_exit () at kernel/softirq.c:303 > #9 0x8000c35c in plat_irq_dispatch (regs=<value optimized out>) at > arch/mips/brcmstb/irq.c:423 > #10 0x80001784 in ret_from_exception () at arch/mips/kernel/entry.S:34 > > The simplest fix was to clear hcd->rh_pollable before going into suspend, Drivers are not supposed to touch that flag. It is for use only by usbcore. > and restoring it after resume, but I am wondering if it is a known issue and > there is a better solution to the problem. This issue has not been reported before. Why didn't the if (!HCD_HW_ACCESSIBLE(hcd)) goto done; statements at the start of ohci_hub_status_data() prevent the unwanted hardware accesses from occurring? Admittedly, it might be a good idea to change this code to if (!HCD_HW_ACCESSIBLE(hcd)) { clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); goto done; } since there's no reason to continue polling if the hardware isn't accessible. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm