diff options
author | Anisse Astier <anisse@astier.eu> | 2011-07-05 16:38:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-03 11:40:46 -0700 |
commit | f06d716d8eb4248e75fa2a5e1288a5ddcff8a9f4 (patch) | |
tree | 73da75e8d72238656dfe46104cc6aecbb63cac48 /drivers/usb | |
parent | 352d0ff21f7a8ce23b0a70a80cd61e5ae566fe60 (diff) | |
download | kernel_samsung_smdk4412-f06d716d8eb4248e75fa2a5e1288a5ddcff8a9f4.tar.gz kernel_samsung_smdk4412-f06d716d8eb4248e75fa2a5e1288a5ddcff8a9f4.tar.bz2 kernel_samsung_smdk4412-f06d716d8eb4248e75fa2a5e1288a5ddcff8a9f4.zip |
ehci: refactor pci quirk to use standard dmi_check_system method
commit 03c75362181b0b1d6a330e7cf8def10ba988dfbe upstream.
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')
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index e9f004ee56b..d8ade499ce3 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -535,20 +535,27 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) iounmap(base); } +static const struct dmi_system_id __initconst ehci_dmi_nohandoff_table[] = { + { + /* Pegatron Lucid (ExoPC) */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "EXOPG06411"), + DMI_MATCH(DMI_BIOS_VERSION, "Lucid-CE-133"), + }, + }, + { } +}; + static void __devinit ehci_bios_handoff(struct pci_dev *pdev, void __iomem *op_reg_base, u32 cap, u8 offset) { int try_handoff = 1, tried_handoff = 0; - /* The Pegatron Lucid (ExoPC) tablet sporadically waits for 90 - * seconds trying the handoff on its unused controller. Skip - * it. */ + /* The Pegatron Lucid tablet sporadically waits for 98 seconds trying + * the handoff on its unused controller. Skip it. */ if (pdev->vendor == 0x8086 && pdev->device == 0x283a) { - const char *dmi_bn = dmi_get_system_info(DMI_BOARD_NAME); - const char *dmi_bv = dmi_get_system_info(DMI_BIOS_VERSION); - if (dmi_bn && !strcmp(dmi_bn, "EXOPG06411") && - dmi_bv && !strcmp(dmi_bv, "Lucid-CE-133")) + if (dmi_check_system(ehci_dmi_nohandoff_table)) try_handoff = 0; } |