Re: [39/45] OHCI: work around for nVidia shutdown problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux