Add the callbacks to enable message-signaled interrupts for EHCI controllers. At the moment, this must be explicitly enabled with a module parameter. Signed-off-by: Clemens Ladisch <clemens@xxxxxxxxxx> --- drivers/usb/host/ehci-pci.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -22,8 +22,29 @@ #error "This file is PCI bus glue. CONFIG_PCI must be defined." #endif +static int enable_msi; +module_param(enable_msi, int, 0444); +MODULE_PARM_DESC(enable_msi, + "enable message-signaled interrupts, 0=no, 1=yes"); + /*-------------------------------------------------------------------------*/ +static int ehci_pci_prepare_irq(struct usb_hcd *hcd) +{ + struct pci_dev *pdev = to_pci_dev(hcd->self.controller); + + if (enable_msi) + pci_enable_msi(pdev); + return 0; +} + +static void ehci_pci_cleanup_irq(struct usb_hcd *hcd) +{ + struct pci_dev *pdev = to_pci_dev(hcd->self.controller); + + pci_disable_msi(pdev); +} + /* called after powerup, by probe or system-pm "wakeup" */ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) { @@ -394,6 +415,9 @@ static const struct hc_driver ehci_pci_h .irq = ehci_irq, .flags = HCD_MEMORY | HCD_USB2, + .pci_prepare_irq = ehci_pci_prepare_irq, + .pci_cleanup_irq = ehci_pci_cleanup_irq, + /* * basic lifecycle operations */ -- 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