On Mon, Mar 28, 2011 at 8:56 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > [Reduced the CC: list; hopefully nobody will mind.] > > On Mon, 28 Mar 2011, Andre "Osku" Schmidt wrote: > > ... > >> Hello, >> >> i think it was back when my distro got linux 2.6.37 that i noticed the >> usb devices are not powered off anymore during shutdown. i was(/am) >> lazy and didn't bother to investigate, until today. i found >> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/42149 which >> mentioned this patch (and that it was supposedly added in 2.6.37). >> >> i boldly reversed this part for my current kernel (2.6.38.1) and build it*: >> >> --- a/drivers/usb/host/ohci-hcd.c >> +++ b/drivers/usb/host/ohci-hcd.c >> @@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd) >> >> Â Â Â ohci = hcd_to_ohci (hcd); >> Â Â Â ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); >> - Â Â ohci_usb_reset (ohci); >> + Â Â ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); >> + >> + Â Â /* If the SHUTDOWN quirk is set, don't put the controller in RESET */ >> + Â Â ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ? >> + Â Â Â Â Â Â Â Â Â Â OHCI_CTRL_RWC | OHCI_CTRL_HCFS : >> + Â Â Â Â Â Â Â Â Â Â OHCI_CTRL_RWC); >> + Â Â ohci_writel(ohci, ohci->hc_control, &ohci->regs->control); >> + >> Â Â Â /* flush the writes */ >> Â Â Â (void) ohci_readl (ohci, &ohci->regs->control); >> Â} >> >> lo and behold, my usb devices are now powered off again at shutdown. >> >> this was my first ever hack on the linux code, and i have no real idea >> what i'm doing here... >> but if theres anything i can do to help to solve this problem, please >> let me know! >> >> lspci -v | grep USB >> >> 00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev >> a3) (prog-if 10 [OHCI]) >> 00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev >> a3) (prog-if 20 [EHCI]) > > Please send the complete output from "lspci -v -s 0b.0". ÂYour "grep > USB" removed important information. > > Alan Stern lspci -v -s 0b.0 00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3) (prog-if 10 [OHCI]) Subsystem: Micro-Star International Co., Ltd. Device 7350 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 22 Memory at fbfff000 (32-bit, non-prefetchable) [size=4K] Capabilities: [44] Power Management version 2 Kernel driver in use: ohci_hcd Kernel modules: ohci-hcd -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html