Re: [PATCH] PNPACPI: Enable Power Support



Hi Witold!

On Wed, 10 Dec 2008, Henrique de Moraes Holschuh wrote:

On Wed, 10 Dec 2008, Witold Szczeponik wrote:
Henrique de Moraes Holschuh wrote:
On Mon, 08 Dec 2008, Witold Szczeponik wrote:
This patch sets the power of PnP ACPI devices to D0 when they
are activated and to D3 when they are disabled. The latter is

This will likely fix my T43 to power down USB during STR. THANKS!!
Now, I just need to check if the ACPI BIOS is smart enough to not do
it when they are configured as wake devices [in the BIOS].


Most likely it won't. :-( My patch takes only care of devices that are
properly registered as PnP by ACPI: attached USB devices don't fall
under that category.

I do mean the UHCI and EHCI bridges, not USB devices hanging off them :)

I will do an in-depth study of the AML in question, I just noticed it is
coupled to some EC magic register, which might be doing stuff the USB
subsystem just can't do normally.

Bah, never mind. Major issue between the keyboard and the chair, on my
end... Got PR# and PS# confused. The ThinkPad ACPI DSDT in question has
the standard crap for wake device control, and PR# methods, but no PS#
methods.

The PR0..PR2 nodes for the UHCI and EHCI USB ports on the ThinkPad T43
mention a power resource object, and that power resource CAN power on/off
the USB ports (and that freaks out the UHCI and EHCI kernel drivers causing
over-current reports, but that was to be expected). The AML code tells the
EC to do some magic that probably tells a MOSFET somewhere in the mainboard
to stop supplying power to the ports.

And Windows XP (this is not a Vista BIOS and I never tried running Vista in
it...) is noticing that power resource (even without PS3 or PR3 nodes) and
calling that power resource _OFF handler to power down USB ports when it
doesn't need these devices for wakeup reasons, before entering STR.

Anyone has any clue on what part of the ACPI spec could result on that
behaviour? Because otherwise I will just bloody special-case it into
thinkpad-acpi's suspend and resume stuff. It will piss the USB subsystem
off if I can't arrange to do it on early resume and late suspend, however.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [linux-usb-devel] ThinkPad T41 - Strange USB 2.0 behaviour
    ... USB Universal Host Controller Interface driver v3.0 ... hub 1-0:1.0: no power switching ... ehci_hcd 0000:00:1d.7: GetStatus port 4 status 001803 POWER sig=j CSC CONNECT ...
    (Linux-Kernel)
  • 2.6.23-rc8-mm2 ACPI Battery Info in /sys but not /proc/acpi
    ... power from the laptop, the scripts immediately send it into hibernate ... # Bus options (PCI etc.) ... # USB Network Adapters ...
    (Linux-Kernel)
  • Re: [PATCH] PNPACPI: Enable Power Support
    ... It needs external means, namely ACPI. ... So we can't just set the pci devices to D0 to cut power to the USB ... ports and USB controller while in STR? ...
    (Linux-Kernel)
  • Re: Time Machine & Laptops.
    ... I use a Seagate USB 2.5" drive all the time and it works great. ... these drives come with USB cables that split off into a Y and take up ... two USB ports on the computer so the drive gets enough power. ...
    (comp.sys.mac.system)
  • Re: Cpq Presario 906
    ... which comes w/o the internal FDD. ... Buying a $15 USB FDD should do the trick. ... USB ports, which are occupied already by other devices. ... another source of power. ...
    (comp.sys.laptops)