Re: [PATCH 0/5] USB HCD MSI(-X) support (was: Do other USB hosts support MSI?)

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

 



Hi Clemens,

Thanks for putting this together.  I'm not sure if I'll have time to
look at it this week, and I'm leaving for a conference on Friday.  So if
you don't hear from me it's not because I hate the patches. :)

Sarah Sharp

On Mon, Jun 21, 2010 at 01:57:31PM +0200, Clemens Ladisch wrote:
> (Sorry for the delay.)
> Sarah Sharp wrote:
> > On Wed, Jun 09, 2010 at 11:16:10AM +0200, Clemens Ladisch wrote:
> > > MSI is just a minor variation of a normal interrupt, but [my old patch]
> > > cannot handle MSI-X as it isn't known how many interrupts are acceptable,
> > > or what the dev parameters in the request_irq() calls should be.
> > 
> > Hmm, why not add new API in the same spot to ask the host how many MSI-X
> > interrupters it can support?  If it says zero, then you can see if it
> > supports MSI with a call to is_pci_msi_allowed().
> 
> The kernel might not be able to allocate that many interrupts, so in
> theory, the pci_enable_msi(x) calls belong into the HCD so that the
> driver can negotiate with the kernel how many interrupts to actually
> use.
> 
> > > It appears that common MSI code is easy, but that implementing MSI-X
> > > still requires replacing most of the generic hcd interrupt handling code
> > > (either with a callback or by replacing the interrupt later).
> > 
> > Perhaps the HCD could provide an MSI/MSI-X call back function?  That
> > would fit with Dong's current patch.
> 
> Yes, the HC driver should be able to decide whether to use MSI-X or MSI.
> 
> > There's also issues with mapping IRQ to internal data structures.  The
> > xHCI host is going to need to be able to map the irq number for the
> > MSI-X vector into a specific event ring that needs to be serviced.
> 
> If the HCD does the request_irq calls by itself, it can just use
> whatever dev parameter it likes.  I've decided not to add another
> callback but to leave this code in the start callback.
> 
> 
> These patches are on top of Dong's; the xHCI stuff is untested.
> 
> 
>  drivers/usb/core/hcd-pci.c  |   36 +++++++--
>  drivers/usb/core/hcd.c      |    5 -
>  drivers/usb/host/ehci-pci.c |   72 ++++++++++++++++--
>  drivers/usb/host/ohci-pci.c |   51 +++++++++++++
>  drivers/usb/host/xhci-pci.c |   83 +++++++++++++++++++++
>  drivers/usb/host/xhci.c     |  137 +++++-------------------------------
>  include/linux/usb/hcd.h     |   11 ++
>  7 files changed, 258 insertions(+), 137 deletions(-)
--
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