linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex,Shi" <alex.shi@intel.com>
To: Andiry Xu <andiry.xu@amd.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	stern@rowland.harvard.edu, Greg KH <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Oliver Neukum <oneukum@suse.de>, Takashi Iwai <tiwai@suse.de>,
	trenn@suse.de, linux-pci@vger.kernel.org,
	Michal Marek <MMarek@suse.com>
Subject: Re: [PATCH] usb: enable pci MSI/MSIX in usb core
Date: Mon, 20 Feb 2012 08:57:03 +0800	[thread overview]
Message-ID: <1329699423.14084.9.camel@debian> (raw)
In-Reply-To: <4F3F4509.4070003@amd.com>

> > 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. 


  reply	other threads:[~2012-02-20  0:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1328531341-22705-1-git-send-email-alex.shi@intel.com>
     [not found] ` <4F311233.9070404@intel.com>
     [not found]   ` <20120207144204.GA7214@kroah.com>
2012-02-07 17:27     ` [PATCH] usb: enable pci MSI/MSIX in usb core Sarah Sharp
2012-02-07 22:13       ` Sarah Sharp
2012-02-08  1:26         ` Alex,Shi
2012-02-08  6:27           ` Alex,Shi
2012-02-08  9:11             ` Alex,Shi
2012-02-14  0:20               ` Sarah Sharp
2012-02-14  0:25                 ` [RFT] USB: Try MSI first before line IRQ for Intel PCIe USB3 HCD Sarah Sharp
2012-02-14  4:43                   ` Alex,Shi
2012-02-16  2:36                 ` [PATCH] usb: enable pci MSI/MSIX in usb core Alex,Shi
2012-02-17  6:44                   ` Alex,Shi
2012-02-17  8:13                     ` Clemens Ladisch
2012-02-17  8:46                       ` Alex,Shi
2012-02-17 10:15                         ` Clemens Ladisch
2012-02-18  6:28                           ` Andiry Xu
2012-02-20  0:57                             ` Alex,Shi [this message]
2012-02-20  3:52                     ` Alex,Shi
2012-02-08 15:07         ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329699423.14084.9.camel@debian \
    --to=alex.shi@intel.com \
    --cc=MMarek@suse.com \
    --cc=andiry.xu@amd.com \
    --cc=clemens@ladisch.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.de \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).