aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-19 12:52:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:49 -0400
commit478a3bab8c87a9ba4a4ba338314e32bb0c378e62 (patch)
tree37e07a18952706e76b36c782ac095c17b0bc8e11 /drivers
parent46f116eab81b21c6ae8c4f169498c632b1f94bf1 (diff)
[PATCH] USB: Always do usb-handoff
This revised patch (as586b) makes usb-handoff permanently true and no longer a kernel boot parameter. It also removes the piix3_usb quirk code; that was nothing more than an early version of the USB handoff code (written at a time when Intel's PIIX3 was about the only motherboard with USB support). And it adds identifiers for the three PCI USB controller classes to pci_ids.h. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/pci-quirks.c46
1 files changed, 3 insertions, 43 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index f7411ca48835..b7fd3f644e1e 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -23,33 +23,6 @@
23#include <linux/acpi.h> 23#include <linux/acpi.h>
24 24
25 25
26/*
27 * PIIX3 USB: We have to disable USB interrupts that are
28 * hardwired to PIRQD# and may be shared with an
29 * external device.
30 *
31 * Legacy Support Register (LEGSUP):
32 * bit13: USB PIRQ Enable (USBPIRQDEN),
33 * bit4: Trap/SMI On IRQ Enable (USBSMIEN).
34 *
35 * We mask out all r/wc bits, too.
36 */
37static void __devinit quirk_piix3_usb(struct pci_dev *dev)
38{
39 u16 legsup;
40
41 pci_read_config_word(dev, 0xc0, &legsup);
42 legsup &= 0x50ef;
43 pci_write_config_word(dev, 0xc0, legsup);
44}
45DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb );
46DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb );
47
48
49/* FIXME these should be the guts of hcd->reset() methods; resolve all
50 * the differences between this version and the HCD's version.
51 */
52
53#define UHCI_USBLEGSUP 0xc0 /* legacy support */ 26#define UHCI_USBLEGSUP 0xc0 /* legacy support */
54#define UHCI_USBCMD 0 /* command register */ 27#define UHCI_USBCMD 0 /* command register */
55#define UHCI_USBINTR 4 /* interrupt register */ 28#define UHCI_USBINTR 4 /* interrupt register */
@@ -83,13 +56,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, qui
83#define EHCI_USBLEGCTLSTS 4 /* legacy control/status */ 56#define EHCI_USBLEGCTLSTS 4 /* legacy control/status */
84#define EHCI_USBLEGCTLSTS_SOOE (1 << 13) /* SMI on ownership change */ 57#define EHCI_USBLEGCTLSTS_SOOE (1 << 13) /* SMI on ownership change */
85 58
86int usb_early_handoff __devinitdata = 0;
87static int __init usb_handoff_early(char *str)
88{
89 usb_early_handoff = 1;
90 return 0;
91}
92__setup("usb-handoff", usb_handoff_early);
93 59
94/* 60/*
95 * Make sure the controller is completely inactive, unable to 61 * Make sure the controller is completely inactive, unable to
@@ -320,17 +286,11 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
320 286
321static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) 287static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
322{ 288{
323 if (!usb_early_handoff) 289 if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
324 return;
325
326 if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x00)) { /* UHCI */
327 quirk_usb_handoff_uhci(pdev); 290 quirk_usb_handoff_uhci(pdev);
328 } else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10)) { /* OHCI */ 291 else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
329 quirk_usb_handoff_ohci(pdev); 292 quirk_usb_handoff_ohci(pdev);
330 } else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x20)) { /* EHCI */ 293 else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI)
331 quirk_usb_disable_ehci(pdev); 294 quirk_usb_disable_ehci(pdev);
332 }
333
334 return;
335} 295}
336DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); 296DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);