Re: [RFT] xhci-plat: Don't enable legacy PCI interrupts.

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

 



On Thu, Aug 08, 2013 at 10:25:36AM -0700, Sarah Sharp wrote:
> Hi Yu,
> 
> Please test this patch, and make sure that interrupts aren't registered
> twice.  I think this approach is better, since it creates a new quirk
> specifically for xhci platform devices, so we can tell them apart from
> PCI devices.
> 
> Sarah Sharp
> 
> >8-------------------------------------------------------------------8<
> 
> The xHCI platform driver calls into usb_add_hcd to register the irq for
> its platform device.  It does not want the xHCI generic driver to
> register an interrupt for it at all.  The original code did that by
> setting the XHCI_BROKEN_MSI quirk, which tells the xHCI driver to not
> enable MSI or MSI-X for a PCI host.
> 
> Unfortunately, if CONFIG_PCI is enabled, and CONFIG_USB_DW3 is enabled,
> the xHCI generic driver will attempt to register a legacy PCI interrupt
> for the xHCI platform device in xhci_try_enable_msi().  This will result
> in a bogus irq being registered, since the underlying device is a
> platform_device, not a pci_device, and thus the pci_device->irq pointer
> will be bogus.
> 
> Add a new quirk, XHCI_PLAT, so that the xHCI generic driver can
> distinguish between a PCI device that can't handle MSI or MSI-X, and a
> platform device that should not have its interrupts touched at all.
> This quirk may be useful in the future, in case other corner cases like
> this arise.
> 
> This patch should be backported to kernels as old as 3.9, that
> contain the commit 00eed9c814cb8f281be6f0f5d8f45025dc0a97eb "USB: xhci:
> correctly enable interrupts".
> 
> Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
> Reported-by: Yu Y Wang <yu.y.wang@xxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx

Looks good to me:

Reviewed-by: Felipe Balbi <balbi@xxxxxx>

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux