On Wed, 19 Dec 2012, Lan Tianyu wrote:
> Hi Alan:
>
> How about this patch?
>
> Index: linux-pm/drivers/usb/host/ohci-pci.c
> ===================================================================
> --- linux-pm.orig/drivers/usb/host/ohci-pci.c 2012-11-01
> 18:21:33.604460469 +0800
> +++ linux-pm/drivers/usb/host/ohci-pci.c 2012-12-19
> 14:39:07.081601806 +0800
> @@ -188,6 +188,15 @@
> pci_write_config_word(pdev, 0x50, misc | 0x0300);
> }
>
> +static int ohci_quirk_bad_wakeup(struct usb_hcd *hcd)
> +{
> + struct ohci_hcd *ohci = hcd_to_ohci (hcd);
> +
> + ohci_dbg(ohci, "marked as bad wakeup.\n");
I'd prefer the message to be something more like "enabled nVidia/SiS
wakeup quirk".
> + hcd->bad_wakeup = true;
> + return 0;
> +}
> +
> /* List of quirks for OHCI */
> static const struct pci_device_id ohci_pci_quirks[] = {
> {
> @@ -238,6 +247,31 @@
> PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
> .driver_data = (unsigned long)ohci_quirk_amd700,
> },
> + {
> + /* MCP51 OHCI */
> + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x026d),
> + .driver_data = (unsigned long)ohci_quirk_bad_wakeup,
> + },
> + {
> + /* MCP61 OHCI */
> + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x03f1),
> + .driver_data = (unsigned long)ohci_quirk_bad_wakeup,
> + },
> + {
> + /* MCP79 OHCI */
> + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0aa5),
> + .driver_data = (unsigned long)ohci_quirk_bad_wakeup,
> + },
> + {
> + /* MCP79 OHCI */
> + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0aa7),
> + .driver_data = (unsigned long)ohci_quirk_bad_wakeup,
> + },
Since we don't know of any nVidia controllers that function correctly,
you might as well match any product ID.
> + {
> + /* SiS OHCI */
> + PCI_DEVICE(PCI_VENDOR_ID_SI, 7001),
> + .driver_data = (unsigned long)ohci_quirk_bad_wakeup,
> + },
>
> /* FIXME for some of the early AMD 760 southbridges, OHCI
> * won't work at all. blacklist them.
> Index: linux-pm/include/linux/usb/hcd.h
> ===================================================================
> --- linux-pm.orig/include/linux/usb/hcd.h 2012-11-01
> 18:21:34.732460451 +0800
> +++ linux-pm/include/linux/usb/hcd.h 2012-12-19 10:48:43.305822774 +0800
> @@ -138,6 +138,7 @@
> resource_size_t rsrc_start; /* memory/io resource
> start */
> resource_size_t rsrc_len; /* memory/io resource
> length */
> unsigned power_budget; /* in mA, 0 = no limit */
> + bool bad_wakeup;
This should be a bitflag (i.e., bad_wakeup:1) and it should come
immediately after has_tt:1.
Alan Stern
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
http://lists.debian.org/[email protected]