Re: [PATCH v2 2/3] USB: Try MSI first before line IRQ for Intel PCIe USB3 HCD

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

 



* Alex,Shi | 2012-01-10 18:14:52 [+0800]:

>We have a PCI USB xhci host controller on a new platform. It have no
>line IRQ definition in BIOS. So the Linux driver refuses to initial this
>controller. But Windows works well for it depending on MSI.
>
>Actually, Linux also can work for MSI. This patch skips the first line
>IRQ checking for our HCD in usb-core pci probe, then try to enable MSI
>firstly. That make this HCD works well under Linux.
>
>Thanks for Sarah's suggestion and review for this patch.
>
>Signed-off-by: Alex Shi <alex.shi@xxxxxxxxx>

This looks kinda like walking backwards. So the problem is that you
don't want to use generic code to setup the irq because it does not
setup MSI(-X) first and does only do the generic IRQ stuff which seem
not work for you. That would mean that your platform does not work in
legacy mode. Is this some testing environment or real product? In case
it is final, do you feed your bios engineer well?

Instead of adding this extra case why not extending
usb_hcd_request_irqs() to look at MSI first? I for intance see

|xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
|xhci_hcd 0000:02:00.0: irq 18, io mem 0xfe400000
|xhci_hcd 0000:02:00.0: Failed to enable MSI-X
|xhci_hcd 0000:02:00.0: irq 46 for MSI/MSI-X

so irq 18 printed and is not used at all. In case of MSI-X you (can) use
multiple interrupts and the core knows only about one. This does not
(yet) do any harm but you always do the half here and the other part is
handled by the hcd core.
Therefore I would suggest to provide a more or less generic way to
enable & disable the IRQ in one place and stop dancing around it.

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