Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248860
b: refs/heads/master
c: 3610ea5
h: refs/heads/master
v: v3
  • Loading branch information
Andy Ross authored and Greg Kroah-Hartman committed May 12, 2011
1 parent 90cd509 commit d3f43d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c853013dcdadb60724268bf860d372fba71694c
refs/heads/master: 3610ea5397b80822e417aaa0e706fd803fb05680
35 changes: 25 additions & 10 deletions trunk/drivers/usb/host/pci-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/acpi.h>
#include <linux/dmi.h>
#include "pci-quirks.h"
#include "xhci-ext-caps.h"

Expand Down Expand Up @@ -507,9 +508,20 @@ static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
void __iomem *op_reg_base,
u32 cap, u8 offset)
{
int msec, tried_handoff = 0;
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. */
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"))
try_handoff = 0;
}

if (cap & EHCI_USBLEGSUP_BIOS) {
if (try_handoff && (cap & EHCI_USBLEGSUP_BIOS)) {
dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n");

#if 0
Expand All @@ -534,20 +546,23 @@ static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
}

/* if boot firmware now owns EHCI, spin till it hands it over. */
msec = 1000;
while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
tried_handoff = 1;
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, offset, &cap);
if (try_handoff) {
int msec = 1000;
while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
tried_handoff = 1;
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, offset, &cap);
}
}

if (cap & EHCI_USBLEGSUP_BIOS) {
/* well, possibly buggy BIOS... try to shut it down,
* and hope nothing goes too wrong
*/
dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
" (BIOS bug?) %08x\n", cap);
if (try_handoff)
dev_warn(&pdev->dev, "EHCI: BIOS handoff failed"
" (BIOS bug?) %08x\n", cap);
pci_write_config_byte(pdev, offset + 2, 0);
}

Expand Down

0 comments on commit d3f43d3

Please sign in to comment.