[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1004271509450.1850-100000@iolanthe.rowland.org>
Date: Tue, 27 Apr 2010 15:21:23 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Ondrej Zary <linux@...nbow-software.org>
cc: linux-pm@...ts.linux-foundation.org, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists