On Wed, 2012-01-11 at 10:56 +0100, Sebastian Andrzej Siewior wrote: > * 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? We have ping the BIOS engineer for this issue. but he said since windows works well. He didn't thinks it is urgent issue. So, we will suffer with this a part of time. Anyway the next patch of this patchset will try MSI for all xhci. It can handle similar issue widely on xhci driver if some platform BIOS just deign for windows. > > 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. Yes, I have thought to try_enable_msi in usb_hcd_request_irqs() or others in hcd core. But it is a bit complex than currect version. Could we do it in next step? -- 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