On Tue, 30 Jan 2007, Dominik Brodowski wrote:

> > There may not be anything we can do about a rogue BIOS, other than to 
> > avoid suspending the controller at all.
> > 
> > Just to make sure, try this:  In ehci-hub.c, near the end of 
> > ehci_bus_suspend(), print out the value returned by ehci_halt().  If it is 
> > 0 then we will know that the controller does get suspended correctly and 
> > something (the BIOS?) starts it up for no good reason.
> 
> +       ret = ehci_halt (ehci);
> +       printk(KERN_INFO "ehci_halt in ehci_bus_suspend returns %d\n", ret);
> 
> Jan 30 18:05:54 [kernel] [   23.918690] ehci_halt in ehci_bus_suspend returns > 0
> ...
> Jan 30 18:05:54 [kernel] [   24.570171] cs: IO port probe 
> 0x800-0x8ff:<6>ehci_hcd 0000:00:1d.7: STS_FLR - clearing. status: 0x2008 intr 
> 0x3f (0x37

Yep, no question about it.  Something (probably the BIOS) is restarting 
the controller and turning on the FLR interrupt mask bit.

> Well, if we notice it has been awakened by the BIOS could we call the
> resume() routines as a workaround?

We don't have a process context handy in which to do that.  Also I'm not 
sure it would work; the resume routine expects the controller to be 
suspended, not already running.  And what's the point of suspending, being 
woken up a few seconds later, suspending again, getting woken up again, 
... ad infinitum?

Better simply to avoid trying to suspend the controller in the first
place.  There are patches under discussion to make that sort of thing 
easier.  For now you can try doing this:

        Edit drivers/usb/core/usb.h and change the definition of
        USB_AUTOSUSPEND_DELAY to (HZ*60).

        Add to your /etc/rc.d/rc.local (or someplace equivalent) a
        line saying:

                echo disabled >/sys/bus/usb/devices/usb1/power/wakeup

Increasing the initial autosuspend delay to 60 seconds will give the 
system a chance to run rc.local, and disabling remote wakeup on the 
controller will then prevent it from being autosuspended.

Alternatively, since you don't have any high-speed USB devices attached, 
you could simply prevent ehci-hcd from being loaded in the first place.  
That would certainly solve the problem. :-)

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to