From: Hannes Reinecke<hare@xxxxxxx>Still a couple of style comments...
xhci has its own interrupt enabling routine, which will try to
use MSI-X/MSI if present. So the usb core shouldn't try to enable
legacy interrupts; on some machines the xhci legacy IRQ setting
is invalid.
v3: Be careful to not break XHCI_BROKEN_MSI workaround (by trenn)
Cc: Bjorn Helgaas<bhelgaas@xxxxxxxxxx>
Cc: Oliver Neukum<oneukum@xxxxxxx>
Cc: Thomas Renninger<trenn@xxxxxxx>
Cc: Yinghai Lu<yinghai@xxxxxxxxxx>
Cc: Frederik Himpe<fhimpe@xxxxxxxxx>
Cc: David Haerdeman<david@xxxxxxxxxxx>
Cc: Alan Stern<stern@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Thomas Renninger<trenn@xxxxxxx>
Signed-off-by: Hannes Reinecke<hare@xxxxxxx>
@@ -187,15 +188,19 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
return -ENODEV;
dev->current_state = PCI_D0;
- /* The xHCI driver supports MSI and MSI-X,
- * so don't fail if the BIOS doesn't provide a legacy IRQ.
+ /*
+ * The xHCI driver has its own irq management
+ * make sure irq setup is not touched for xhci in generic hcd code
*/
- if (!dev->irq&& (driver->flags& HCD_MASK) != HCD_USB3) {
- dev_err(&dev->dev,
- "Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
- pci_name(dev));
- retval = -ENODEV;
- goto disable_pci;
+ if ((driver->flags& HCD_MASK) != HCD_USB3) {
+ if (!dev->irq) {
+ dev_err(&dev->dev,
+ "Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
+ pci_name(dev));[...]
+ retval = -ENODEV;
+ goto disable_pci;
+ }
+ hcd_irq = dev->irq;
}
hcd = usb_create_hcd(driver,&dev->dev, pci_name(dev));
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c[...]
index f1f01a8..849470b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
return -EINVAL;
}
+ legacy_irq: