Re: [PATCH v3 1/1] xhci: supporting msi/msi-x

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

 



On Tue, May 18, 2010 at 12:14:40PM -0500, Nguyen, Dong wrote:
> Hi Sarah,
> 
> We tired to duplicate the Oops message here with USB mouse, USB 2.0/3.0 HDD and could not duplicate the issue.
> 
> 1. Does the Oops message occur with other devices (USB 2.0/3.0 HDD, flash drive, keyboard) on your system?

It also oopses with a HS hub and a flash drive.

> 2. With CONFIG_PCI_MSI=y and no USB 3.0 MSI patch apply, does your system still hung?

No, it does not hang.  All the same devices work with my master branch
with CONFIG_PCI_MSI=y.

> 3. Could you attach the config file so we can apply here to duplicate the issue?

Attached.  This is on a laptop with an ExpressCard xHCI host.

One thing I wonder about is that you're setting up the IRQ handler to be
xhci_irq(), not usb_hcd_irq().  usb_hcd_irq() does more than xhci_irq()
does, including disabling interrupts before the call to xhci_irq(), and
enabling them afterwards.  So I think you should use usb_hcd_irq() in
this line instead:

                /* fall back to legacy IRQ */
                ret = request_irq(pdev->irq,
                                        (irq_handler_t)xhci_irq,
                                        IRQF_SHARED,
                                        "xhci_hcd",
                                        xhci_to_hcd(xhci));

I think you'll also want to set xhci->driver->irq to be xhci_irq().
Then the behavior for falling back to PCI interrupts will be the same as
when the xHCI driver didn't have MSI support.

Along the same lines, do you need to disable interrupts in your
MSI/MSI-X handler?

Also, have you looked at what usb_add_hcd() does if driver->irq is
non-null?  It modifies the irqflags if the IRQ is shared:

                /* IRQF_DISABLED doesn't work as advertised when used together
                 * with IRQF_SHARED. As usb_hcd_irq() will always disable
                 * interrupts we can remove it here.
                 */
                if (irqflags & IRQF_SHARED)
                        irqflags &= ~IRQF_DISABLED;

You might need to add something similar to xhci_run() when you have to
fall back to PCI interrupts.

Sarah Sharp
--
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