diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-14 17:48:15 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-14 17:48:15 -0500 |
| commit | 887aa58e482dbf6d35d24cfa7b3315c8f5543339 (patch) | |
| tree | b72ffb8b5cb63f433afb59e7af4da0b92b9a2c86 | |
| parent | b7bc5925a9aafae970c3db1f118c97a7d503114e (diff) | |
| parent | 68d07f64b8a11a852d48d1b05b724c3e20c0d94b (diff) | |
Merge tag 'for-usb-linus-2012-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
xHCI bug fix for broken BIOS on some Intel systems.
Happy Valentine's Day! Your present is a working xHCI driver under some
Intel systems with buggy BIOSes that don't provide a legacy PCI IRQ line
for the USB 3.0 host.
Please queue for 3.3 and stable to share the love!
| -rw-r--r-- | drivers/usb/core/hcd-pci.c | 5 | ||||
| -rw-r--r-- | drivers/usb/core/hcd.c | 6 | ||||
| -rw-r--r-- | drivers/usb/host/xhci.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index d136b8f4c8a7..81e2c0d9c17d 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
| @@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 187 | return -ENODEV; | 187 | return -ENODEV; |
| 188 | dev->current_state = PCI_D0; | 188 | dev->current_state = PCI_D0; |
| 189 | 189 | ||
| 190 | if (!dev->irq) { | 190 | /* The xHCI driver supports MSI and MSI-X, |
| 191 | * so don't fail if the BIOS doesn't provide a legacy IRQ. | ||
| 192 | */ | ||
| 193 | if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { | ||
| 191 | dev_err(&dev->dev, | 194 | dev_err(&dev->dev, |
| 192 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", | 195 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", |
| 193 | pci_name(dev)); | 196 | pci_name(dev)); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index eb19cba34ac9..e1282328fc27 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
| @@ -2447,8 +2447,10 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
| 2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) | 2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) |
| 2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); | 2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); |
| 2449 | 2449 | ||
| 2450 | /* enable irqs just before we start the controller */ | 2450 | /* enable irqs just before we start the controller, |
| 2451 | if (usb_hcd_is_primary_hcd(hcd)) { | 2451 | * if the BIOS provides legacy PCI irqs. |
| 2452 | */ | ||
| 2453 | if (usb_hcd_is_primary_hcd(hcd) && irqnum) { | ||
| 2452 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); | 2454 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); |
| 2453 | if (retval) | 2455 | if (retval) |
| 2454 | goto err_request_irq; | 2456 | goto err_request_irq; |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6bbe3c3a7111..c939f5fdef9e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
| @@ -352,6 +352,11 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
| 352 | /* hcd->irq is -1, we have MSI */ | 352 | /* hcd->irq is -1, we have MSI */ |
| 353 | return 0; | 353 | return 0; |
| 354 | 354 | ||
| 355 | if (!pdev->irq) { | ||
| 356 | xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); | ||
| 357 | return -EINVAL; | ||
| 358 | } | ||
| 359 | |||
| 355 | /* fall back to legacy interrupt*/ | 360 | /* fall back to legacy interrupt*/ |
| 356 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, | 361 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, |
| 357 | hcd->irq_descr, hcd); | 362 | hcd->irq_descr, hcd); |
