Re: [PATCH] usb: correctly enable interrupts for xhci

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 1 Mar 2013, Hannes Reinecke wrote:

> xhci might run with MSI/MSI-X only, with no support for legacy
> interrupts. On these devices the request_irq() call in usb_add_hcd()
> will fail, causing the entire device to fail.
> For xhci this is especially painful as the driver will enable
> interrupts during xhci_run(), so the initial call to request_irq()
> is not required anyway.
> 
> This patch adds a flag 'msix_supported' to struct usb_hcd, which
> will cause usb_add_hcd() to skip interrupt setup. This flag is
> set in xhci-pci, so the registration will skip the first request_irq()
> and can proceed.

I think it might be better to fix this in hcd-pci.c:usb_hcd_pci_probe.  
At that point if we see that MSI/MSI-X is available, the call to 
usb_add_hcd can pass 0 instead of dev->irq.

It may even be possible to do this without adding an extra flag 
anywhere.  It also has the advantage of keeping special knowledge about 
MSI encapsulated in the PCI-specific parts of the code.

Alan Stern

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux