aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-04-17 16:06:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:40 -0400
commit931384fb0ec99a7459b3052f5d4db15bcb5037ea (patch)
tree5fd2ebc5fcaefcc823f9c1c5c62dca5898804c3f
parent296c02429271e1b9525b52fed76daa3b1cafefc4 (diff)
USB: add an ohci board-specific quirk
Use the new ohci-pci quirk infrastructure to address the problem it was created to address: a quirk specific to the Portege 4000, in buzilla as http://bugzilla.kernel.org/show_bug.cgi?id=6723 Also fix a misuse of "__devinit" for the quirk functions. It must not be used without first ensuring that the references from the quirk tables are gone, and that the function using those quirk tables is also gone. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/host/ohci-pci.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index b331ac4d0d62..321f35150b81 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -20,10 +20,16 @@
20 20
21/*-------------------------------------------------------------------------*/ 21/*-------------------------------------------------------------------------*/
22 22
23static int broken_suspend(struct usb_hcd *hcd)
24{
25 device_init_wakeup(&hcd->self.root_hub->dev, 0);
26 return 0;
27}
28
23/* AMD 756, for most chips (early revs), corrupts register 29/* AMD 756, for most chips (early revs), corrupts register
24 * values on read ... so enable the vendor workaround. 30 * values on read ... so enable the vendor workaround.
25 */ 31 */
26static int __devinit ohci_quirk_amd756(struct usb_hcd *hcd) 32static int ohci_quirk_amd756(struct usb_hcd *hcd)
27{ 33{
28 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 34 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
29 35
@@ -31,16 +37,14 @@ static int __devinit ohci_quirk_amd756(struct usb_hcd *hcd)
31 ohci_dbg (ohci, "AMD756 erratum 4 workaround\n"); 37 ohci_dbg (ohci, "AMD756 erratum 4 workaround\n");
32 38
33 /* also erratum 10 (suspend/resume issues) */ 39 /* also erratum 10 (suspend/resume issues) */
34 device_init_wakeup(&hcd->self.root_hub->dev, 0); 40 return broken_suspend(hcd);
35
36 return 0;
37} 41}
38 42
39/* Apple's OHCI driver has a lot of bizarre workarounds 43/* Apple's OHCI driver has a lot of bizarre workarounds
40 * for this chip. Evidently control and bulk lists 44 * for this chip. Evidently control and bulk lists
41 * can get confused. (B&W G3 models, and ...) 45 * can get confused. (B&W G3 models, and ...)
42 */ 46 */
43static int __devinit ohci_quirk_opti(struct usb_hcd *hcd) 47static int ohci_quirk_opti(struct usb_hcd *hcd)
44{ 48{
45 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 49 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
46 50
@@ -53,7 +57,7 @@ static int __devinit ohci_quirk_opti(struct usb_hcd *hcd)
53 * identify the USB (fn2). This quirk might apply to more or 57 * identify the USB (fn2). This quirk might apply to more or
54 * even all NSC stuff. 58 * even all NSC stuff.
55 */ 59 */
56static int __devinit ohci_quirk_ns(struct usb_hcd *hcd) 60static int ohci_quirk_ns(struct usb_hcd *hcd)
57{ 61{
58 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 62 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
59 struct pci_dev *b; 63 struct pci_dev *b;
@@ -75,7 +79,7 @@ static int __devinit ohci_quirk_ns(struct usb_hcd *hcd)
75 * delays before control or bulk queues get re-activated 79 * delays before control or bulk queues get re-activated
76 * in finish_unlinks() 80 * in finish_unlinks()
77 */ 81 */
78static int __devinit ohci_quirk_zfmicro(struct usb_hcd *hcd) 82static int ohci_quirk_zfmicro(struct usb_hcd *hcd)
79{ 83{
80 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 84 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
81 85
@@ -88,7 +92,7 @@ static int __devinit ohci_quirk_zfmicro(struct usb_hcd *hcd)
88/* Check for Toshiba SCC OHCI which has big endian registers 92/* Check for Toshiba SCC OHCI which has big endian registers
89 * and little endian in memory data structures 93 * and little endian in memory data structures
90 */ 94 */
91static int __devinit ohci_quirk_toshiba_scc(struct usb_hcd *hcd) 95static int ohci_quirk_toshiba_scc(struct usb_hcd *hcd)
92{ 96{
93 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 97 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
94 98
@@ -129,6 +133,14 @@ static const struct pci_device_id ohci_pci_quirks[] = {
129 PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA_2, 0x01b6), 133 PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA_2, 0x01b6),
130 .driver_data = (unsigned long)ohci_quirk_toshiba_scc, 134 .driver_data = (unsigned long)ohci_quirk_toshiba_scc,
131 }, 135 },
136 {
137 /* Toshiba portege 4000 */
138 .vendor = PCI_VENDOR_ID_AL,
139 .device = 0x5237,
140 .subvendor = PCI_VENDOR_ID_TOSHIBA_2,
141 .subdevice = 0x0004,
142 .driver_data = (unsigned long) broken_suspend,
143 },
132 /* FIXME for some of the early AMD 760 southbridges, OHCI 144 /* FIXME for some of the early AMD 760 southbridges, OHCI
133 * won't work at all. blacklist them. 145 * won't work at all. blacklist them.
134 */ 146 */