lkml.org 
[lkml]   [2012]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: enable pci MSI/MSIX in usb core
From
Date
> > Assume that an XHCI controller has two rings, and that each one gets its
> > own MSI-X interrupt. How should the driver decide which of the rings
> > needs to be handled?
> >
> > irqreturn_t xhci_msix_irq(struct usb_hcd *hcd)
> > {
> > struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> >
> > if (...)
> > handle(xhci->ring[0]);
> > else
> > handle(xhci->ring[1]);
> > }
> >
> > I.e., what should go into the if()?
> >
> >
>
> Currently xHCI driver only support one ERST event ring. If we need to
> support multiple event rings in the future, it's simple: in
> usb_hcd_request_msi_msix_irqs, change the last parameter of
> request_irq() to xhci->erst[i], and we can get the corresponding erst[i]
> in xhci_msi_irq() like this:
>
> irqreturn_t xhci_msi_irq(int irq, void *dev_id)
> {
> struct xhci_erst *erst = dev_id;
> ...
> /* Handle corresponding event ring pointed by erst */
> }
>
> See Matthew Wilcox's patchset below for reference:
>
> www.spinics.net/lists/linux-usb/msg47353.html

Oh. Thanks Andiry and Clemens! The problem really worth to have another
patchset for it.



\
 
 \ /
  Last update: 2012-02-20 02:01    [W:0.048 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site