Skip to contentSkip to conversation

xhci: correctly enable interrupts

PATCH In review Hannes Reinecke 7 participants 11 messages Mar 4, 2013 – Mar 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xhci: correctly enable interrupts

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.

Cc Bjorn Helgaas <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
drivers/usb/core/hcd-pci.c +16 -9
index 622b4a4..2647e75 100644
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	struct hc_driver	*driver;
 	struct usb_hcd		*hcd;
 	int			retval;
+	int			hcd_irq = 0;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -187,15 +188,21 @@ 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 supports MSI and MSI-X,
+	 * so don't fail if the BIOS doesn't provide a legacy IRQ
+	 * and do not try to enable legacy IRQs.
 	 */
-	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));
@@ -245,7 +252,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pci_set_master(dev);
 
-	retval = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+	retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED);
 	if (retval != 0)
 		goto unmap_registers;
 	set_hs_companion(dev, hcd);
Tested-by on v2 1/1
#1 lore raw
Quoted 5 lines · Hannes Reinecke

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.

Quoted 8 lines
Cc Bjorn Helgaas <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>

No idea if it's the "right" solution but it works for me.

Quoted 53 lines
drivers/usb/core/hcd-pci.c +16 -9
index 622b4a4..2647e75 100644
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	struct hc_driver	*driver;
 	struct usb_hcd		*hcd;
 	int			retval;
+	int			hcd_irq = 0;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -187,15 +188,21 @@ 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 supports MSI and MSI-X,
+	 * so don't fail if the BIOS doesn't provide a legacy IRQ
+	 * and do not try to enable legacy IRQs.
 	 */
-	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));
@@ -245,7 +252,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pci_set_master(dev);
 
-	retval = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+	retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED);
 	if (retval != 0)
 		goto unmap_registers;
 	set_hs_companion(dev, hcd);
Signature · 1 line
David Härdeman
#2 lore raw
In reply to Hannes Reinecke

Hello.

Quoted 18 lines · Hannes Reinecke

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.

Cc Bjorn Helgaas <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
drivers/usb/core/hcd-pci.c +0 -0
index 622b4a4..2647e75 100644

[...]

Quoted 12 lines
drivers/usb/core/hcd-pci.c +4 -3
@@ -187,15 +188,21 @@ 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 supports MSI and MSI-X,
+	 * so don't fail if the BIOS doesn't provide a legacy IRQ
+	 * and do not try to enable legacy IRQs.
  	 */
-	if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) {

drivers/usb/core/hcd-pci.c int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 200

Quoted 10 lines
drivers/usb/core/hcd-pci.c +5 -5
-		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",

The message strings are allowed to take more than 80 chars (to facilitate
grepping for them), so no need to break this one; checkpatch.pl should not complain...

drivers/usb/core/hcd-pci.c int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 208

Quoted 8 lines
drivers/usb/core/hcd-pci.c +5 -0
+				pci_name(dev));
+			retval = -ENODEV;
+			goto disable_pci;
+		}
+		hcd_irq = dev->irq;
  	}
 
  	hcd = usb_create_hcd(driver, &dev->dev, pci_name(dev));

WBR, Sergei

#3 lore raw
In reply to Hannes Reinecke
Quoted 4 lines · Hannes Reinecke

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.

This version of the patch is much better than the first one, IMO. Thank you.

Alan Stern

#4 lore raw
Quoted 7 lines · Alan Stern
Quoted 4 lines · Hannes Reinecke

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.

This version of the patch is much better than the first one, IMO.

I also have this issue. Unfortunately pci read only gives an irq of 255 in secure boot mode and I don't want to struggle with kernel/module signing to test this.

I found one issue with this patch:
For xhci legacy PCI is not tried to be set up now anymore (before MSI(x) is tried) which is a correct fix.

But in xhci_try_enable_msi() drivers/usb/host/xhci.c if MSI is known broken (xhci->quirks & XHCI_BROKEN_MSI), it relies on legacy IRQ being enabled already.
Instead it should use the "enable legacy IRQ" code later in the same function which is the fallback if MSI setup does not succeed.

I send an updated version taking care about above and including the "do not split string" concern Sergei mentioned.

Thomas

#5 lore raw

PATCH v3 1/1 xhci: correctly enable interrupts

In reply to Alan Stern

From: Hannes Reinecke <[email protected]>

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 <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
drivers/usb/core/hcd-pci.c +14 -9
index 622b4a4..2b487d4 100644
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	struct hc_driver	*driver;
 	struct usb_hcd		*hcd;
 	int			retval;
+	int			hcd_irq = 0;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -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));
@@ -245,7 +250,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pci_set_master(dev);
 
-	retval = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+	retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED);
 	if (retval != 0)
 		goto unmap_registers;
 	set_hs_companion(dev, hcd);
drivers/usb/host/xhci.c +2 -1
index f1f01a8..849470b 100644
@@ -350,7 +350,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 	 * generate interrupts.  Don't even try to enable MSI.
 	 */
 	if (xhci->quirks & XHCI_BROKEN_MSI)
-		return 0;
+		goto legacy_irq;
 
 	/* unregister the legacy interrupt */
 	if (hcd->irq)
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 		return -EINVAL;
 	}
 
+ legacy_irq:
 	/* fall back to legacy interrupt*/
 	ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED,
 			hcd->irq_descr, hcd);
#6 lore raw

Hello.

Quoted 17 lines · Thomas Renninger

From: Hannes Reinecke<[email protected]>

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<[email protected]>
Cc Oliver Neukum<[email protected]>
Cc Thomas Renninger<[email protected]>
Cc Yinghai Lu<[email protected]>
Cc Frederik Himpe<[email protected]>
Cc David Haerdeman<[email protected]>
Cc Alan Stern<[email protected]>
Quoted 2 lines

Still a couple of style comments...

[...]

Quoted 11 lines
drivers/usb/core/hcd-pci.c +3 -3
@@ -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) {

drivers/usb/core/hcd-pci.c int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 199

Quoted 10 lines
drivers/usb/core/hcd-pci.c +4 -5
-		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",
 

Could you indent the string like the line below?

Quoted 9 lines
drivers/usb/core/hcd-pci.c +5 -0
+				pci_name(dev));
+			retval = -ENODEV;
+			goto disable_pci;
+		}
+		hcd_irq = dev->irq;
  	}
 
  	hcd = usb_create_hcd(driver,&dev->dev, pci_name(dev));

[...]

Quoted 5 lines
drivers/usb/host/xhci.c +0 -0
index f1f01a8..849470b 100644

[...]

drivers/usb/host/xhci.c static int xhci_try_enable_msi(struct usb_hcd *hcd) · line 375

Quoted 6 lines
drivers/usb/host/xhci.c +1 -0
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
  		return -EINVAL;
  	}
 
+ legacy_irq:
 

Labels shouldn't be indented by a space (unless the existing coding
style has them indented already, of course).
Although that might be a rule dropped by checkpatch.pl already -- it doesn't complain.

WBR, Sergei

#7 lore raw
Quoted 11 lines · Sergei Shtylyov

drivers/usb/host/xhci.c static int xhci_try_enable_msi(struct usb_hcd *hcd) · line 375

Quoted 6 lines
drivers/usb/host/xhci.c +1 -0
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
  		return -EINVAL;
  	}
 
+ legacy_irq:
 

Labels shouldn't be indented by a space (unless the existing coding
style has them indented already, of course).
Although that might be a rule dropped by checkpatch.pl already -- it doesn't complain.

Indeed, there's a definite advantage to putting a space before a label:
The diff program doesn't get confused into thinking the label is the start of a new function.

Alan Stern

#8 lore raw
In reply to Thomas Renninger
Quoted 17 lines · Thomas Renninger

From: Hannes Reinecke <[email protected]>

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 <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
Quoted 2 lines

Argh, I should have added:
CC: [email protected]

This seem to be a common issue on new machines. And having xhci not functional at all there is nasty.

The patch is not complex and should fulfill all stable@ criteria.

Is this the official USB mainline subtree?:
https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git

Adding Felipe, would be great if this one can get queued for 3.9 inclusion. Would be nice if:
CC: [email protected]
can be added manually, I can also explicitly submit it to stable@ as soon as it hits Linus' tree.

Thanks,

Thomas

Quoted 72 lines
drivers/usb/core/hcd-pci.c +14 -9
index 622b4a4..2b487d4 100644
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct
 pci_device_id *id) struct hc_driver	*driver;
 	struct usb_hcd		*hcd;
 	int			retval;
+	int			hcd_irq = 0;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -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));
@@ -245,7 +250,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct
 pci_device_id *id)
 
 	pci_set_master(dev);
 
-	retval = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+	retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED);
 	if (retval != 0)
 		goto unmap_registers;
drivers/usb/core/hcd-pci.c +0 -0
 	set_hs_companion(dev, hcd);
drivers/usb/host/xhci.c +2 -1
index f1f01a8..849470b 100644
@@ -350,7 +350,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 	 * generate interrupts.  Don't even try to enable MSI.
 	 */
 	if (xhci->quirks & XHCI_BROKEN_MSI)
-		return 0;
+		goto legacy_irq;
 
 	/* unregister the legacy interrupt */
 	if (hcd->irq)
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 		return -EINVAL;
 	}
 
+ legacy_irq:
 	/* fall back to legacy interrupt*/
 	ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED,
 			hcd->irq_descr, hcd);
maintainer
#9 lore raw
Quoted 18 lines · Thomas Renninger
Quoted 17 lines · Thomas Renninger

From: Hannes Reinecke <[email protected]>

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 <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
Quoted 5 lines
Quoted 2 lines

Argh, I should have added:
CC: [email protected]

You mean "[email protected]" :)

I'll go do it...

thanks,

greg k-h

Acked-by on v3 1/1
#10 lore raw
In reply to Thomas Renninger

Looks fine on the xHCI portion. Thanks for catching the XHCI_BROKEN_MSI case.

Quoted 95 lines · Thomas Renninger

From: Hannes Reinecke <[email protected]>

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 <[email protected]>
Cc Oliver Neukum <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Frederik Himpe <[email protected]>
Cc David Haerdeman <[email protected]>
Cc Alan Stern <[email protected]>
drivers/usb/core/hcd-pci.c +14 -9
index 622b4a4..2b487d4 100644
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	struct hc_driver	*driver;
 	struct usb_hcd		*hcd;
 	int			retval;
+	int			hcd_irq = 0;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -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));
@@ -245,7 +250,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pci_set_master(dev);
 
-	retval = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+	retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED);
 	if (retval != 0)
 		goto unmap_registers;
 	set_hs_companion(dev, hcd);
drivers/usb/host/xhci.c +2 -2
index f1f01a8..849470b 100644
@@ -350,7 +350,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 	 * generate interrupts.  Don't even try to enable MSI.
 	 */
 	if (xhci->quirks & XHCI_BROKEN_MSI)
-		return 0;
+		goto legacy_irq;
 
 	/* unregister the legacy interrupt */
 	if (hcd->irq)
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 		return -EINVAL;
 	}
 
+ legacy_irq:
 	/* fall back to legacy interrupt*/
 	ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED,
 			hcd->irq_descr, hcd);
 
--

To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html