lkml.org 
[lkml]   [2010]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] [RFC] ehci: Disable wake on overcurrent (WKOC_E) and disconnect (WKDISC_E)
    On Tue, 27 Apr 2010, Ondrej Zary wrote:

    > The previous patch was not enough as it worked only when there were no USB
    > devices connected. With a bus-powered device connected, power loss causes
    > disconnect which wakes up the machine immediately again.

    You said earlier that the host controller was disabled for remote
    wakeup ("/sys/devices/pci0000:00/0000:00:1d.7/power/wakeup is disabled
    by default"). So even though the root hub might issue a wakeup
    request, the controller hardware should not forward that request to the
    PCI bus and it should not cause the system to wake up.

    > Does anyone know why is this enabled by default?

    Why _what_ is enabled? Detection of disconnects? Because otherwise
    your computer wouldn't realize anything had happened when a suspended
    USB device was unplugged from a suspended root hub.

    > No other USB host driver
    > (except oxu210hp-hcd which is based on EHCI) does that.

    Look again -- they all do. (All the HCDs that support suspend/resume,
    anyway.)

    > This also means that
    > suspended laptop wakes up when disconnecting a mouse?

    No, for the reason I described above. The controller is aware of the
    wakeup request but doesn't generate a PME# event. Likewise for desktop
    systems.

    > I don't have any to test
    > right now. Wakeup on USB connect makes a bit more sense but I'd say that it's
    > still not a good idea to enable it by default.
    >
    > If we don't need that, perhaps the following patch should be applied.
    >
    >
    > Disable wake on overcurrent and disconnect in EHCI.
    > This fixes immediate resume from standby on boards where port power is lost
    > in standby which triggers overcurrent detection and disconnect if a
    > bus-powered device is connected. At least Asus P4P800 boards are affected when
    > any of the USBPWxx (e.g. USBPW12) jumpers is set to 5V.

    Why would you want to change the jumper settings? Host controllers are
    _supposed_ to supply 5V power during system suspend.

    Alan Stern



    \
     
     \ /
      Last update: 2010-04-27 21:23    [W:4.041 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site