aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
authorAnisse Astier <anisse@astier.eu>2011-07-05 10:38:45 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-08 17:55:07 -0400
commit03c75362181b0b1d6a330e7cf8def10ba988dfbe (patch)
tree5610cdaf97af22e51385a0c37e9d5dd0a9f1e01d /drivers/usb/host/pci-quirks.c
parentcc62a7eb6396e8be95b9a30053ed09191818b99b (diff)
ehci: refactor pci quirk to use standard dmi_check_system method
In commit 3610ea5397b80822e417aaa0e706fd803fb05680 (ehci: workaround for pci quirk timeout on ExoPC), a workaround was added to skip the negociation for the handoff of the EHCI controller. Refactor the DMI detection code to use standard dmi_check_system function. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index fd930618c28f..04600a9c6e4a 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -507,20 +507,27 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
507 iounmap(base); 507 iounmap(base);
508} 508}
509 509
510static const struct dmi_system_id __initconst ehci_dmi_nohandoff_table[] = {
511 {
512 /* Pegatron Lucid (ExoPC) */
513 .matches = {
514 DMI_MATCH(DMI_BOARD_NAME, "EXOPG06411"),
515 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-CE-133"),
516 },
517 },
518 { }
519};
520
510static void __devinit ehci_bios_handoff(struct pci_dev *pdev, 521static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
511 void __iomem *op_reg_base, 522 void __iomem *op_reg_base,
512 u32 cap, u8 offset) 523 u32 cap, u8 offset)
513{ 524{
514 int try_handoff = 1, tried_handoff = 0; 525 int try_handoff = 1, tried_handoff = 0;
515 526
516 /* The Pegatron Lucid (ExoPC) tablet sporadically waits for 90 527 /* The Pegatron Lucid tablet sporadically waits for 98 seconds trying
517 * seconds trying the handoff on its unused controller. Skip 528 * the handoff on its unused controller. Skip it. */
518 * it. */
519 if (pdev->vendor == 0x8086 && pdev->device == 0x283a) { 529 if (pdev->vendor == 0x8086 && pdev->device == 0x283a) {
520 const char *dmi_bn = dmi_get_system_info(DMI_BOARD_NAME); 530 if (dmi_check_system(ehci_dmi_nohandoff_table))
521 const char *dmi_bv = dmi_get_system_info(DMI_BIOS_VERSION);
522 if (dmi_bn && !strcmp(dmi_bn, "EXOPG06411") &&
523 dmi_bv && !strcmp(dmi_bv, "Lucid-CE-133"))
524 try_handoff = 0; 531 try_handoff = 0;
525 } 532 }
526 533