From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Thomas Renninger <trenn@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Hannes Reinecke <hare@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>,
Oliver Neukum <oneukum@suse.de>, Yinghai Lu <yinghai@kernel.org>,
Frederik Himpe <fhimpe@vub.ac.be>,
David Haerdeman <david@hardeman.nu>
Subject: Re: [PATCH][v3] xhci: correctly enable interrupts
Date: Mon, 04 Mar 2013 21:08:49 +0300 [thread overview]
Message-ID: <5134E331.30303@cogentembedded.com> (raw)
In-Reply-To: <1742014.AbCVskUi8i@skinner.arch.suse.de>
Hello.
On 03/04/2013 07:14 PM, Thomas Renninger wrote:
> From: Hannes Reinecke<hare@suse.de>
>
> xhci has its own interrupt enabling routine, which will try to
> use MSI-X/MSI if present. So the usb core shouldn't try to enable
> legacy interrupts; on some machines the xhci legacy IRQ setting
> is invalid.
>
> v3: Be careful to not break XHCI_BROKEN_MSI workaround (by trenn)
>
> Cc: Bjorn Helgaas<bhelgaas@google.com>
> Cc: Oliver Neukum<oneukum@suse.de>
> Cc: Thomas Renninger<trenn@suse.de>
> Cc: Yinghai Lu<yinghai@kernel.org>
> Cc: Frederik Himpe<fhimpe@vub.ac.be>
> Cc: David Haerdeman<david@hardeman.nu>
> Cc: Alan Stern<stern@rowland.harvard.edu>
>
> Reviewed-by: Thomas Renninger<trenn@suse.de>
> Signed-off-by: Hannes Reinecke<hare@suse.de>
Still a couple of style comments...
[...]
> @@ -187,15 +188,19 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
> return -ENODEV;
> dev->current_state = PCI_D0;
>
> - /* The xHCI driver supports MSI and MSI-X,
> - * so don't fail if the BIOS doesn't provide a legacy IRQ.
> + /*
> + * The xHCI driver has its own irq management
> + * make sure irq setup is not touched for xhci in generic hcd code
> */
> - if (!dev->irq&& (driver->flags& HCD_MASK) != HCD_USB3) {
> - dev_err(&dev->dev,
> - "Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
> - pci_name(dev));
> - retval = -ENODEV;
> - goto disable_pci;
> + if ((driver->flags& HCD_MASK) != HCD_USB3) {
> + if (!dev->irq) {
> + dev_err(&dev->dev,
> + "Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
>
Could you indent the string like the line below?
> + pci_name(dev));
> + retval = -ENODEV;
> + goto disable_pci;
> + }
> + hcd_irq = dev->irq;
> }
>
> hcd = usb_create_hcd(driver,&dev->dev, pci_name(dev));
>
[...]
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index f1f01a8..849470b 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
>
[...]
> @@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
> return -EINVAL;
> }
>
> + legacy_irq:
>
Labels shouldn't be indented by a space (unless the existing coding
style has them indented already, of course).
Although that might be a rule dropped by checkpatch.pl already -- it
doesn't complain.
WBR, Sergei
next prev parent reply other threads:[~2013-03-04 17:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 8:22 [PATCH][v2] xhci: correctly enable interrupts Hannes Reinecke
2013-03-04 11:25 ` David Härdeman
2013-03-04 13:27 ` Sergei Shtylyov
2013-03-04 15:26 ` Alan Stern
2013-03-04 16:11 ` Thomas Renninger
2013-03-04 16:14 ` [PATCH][v3] " Thomas Renninger
2013-03-04 18:08 ` Sergei Shtylyov [this message]
2013-03-04 17:36 ` Alan Stern
2013-03-05 10:45 ` Thomas Renninger
2013-03-15 18:34 ` Greg KH
2013-03-05 23:37 ` Sarah Sharp
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=5134E331.30303@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=bhelgaas@google.com \
--cc=david@hardeman.nu \
--cc=fhimpe@vub.ac.be \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=stern@rowland.harvard.edu \
--cc=trenn@suse.de \
--cc=yinghai@kernel.org \
/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