[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1303010951100.1534-100000@iolanthe.rowland.org>
Date: Fri, 1 Mar 2013 09:54:42 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Hannes Reinecke <hare@...e.de>
cc: linux-usb@...r.kernel.org, <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Oliver Neukum <oneukum@...e.de>,
Thomas Renninger <trenn@...e.de>,
Yinghai Lu <yinghai@...nel.org>,
Frederik Himpe <fhimpe@....ac.be>,
David Haerdeman <david@...deman.nu>
Subject: Re: [PATCH] usb: correctly enable interrupts for xhci
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists