On Monday, February 03, 2014 6:29 PM, Jingoo Han wrote: > On Thursday, January 30, 2014 1:29 AM, Bjørn Erik Nilsen wrote: > > On Fri, 2014-01-24 at 07:48 +0100, Pratyush Anand wrote: > > > On Thu, Jan 23, 2014 at 11:20:55PM +0800, Bjørn Erik Nilsen wrote: > > > > On Thu, 2014-01-23 at 07:51 +0100, Pratyush Anand wrote: > > > > > On Thu, Jan 23, 2014 at 01:52:19PM +0800, Jingoo Han wrote: > > > > > > On Thursday, January 23, 2014 5:39 AM, Jingoo Han wrote: > > > > > > > > > > > > > > I’m currently playing with MSI support in pci-imx6.c using Harro Haan’s patch [*]. > > > > > > > > > > > > > > Are there any technical reasons why dw_pcie_msi_init cannot be called > > > > > > > from dw_msi_setup_irq? > > Or rather, > > > > > > > why it should not? > > > > > > > > > > > > No, there is no special reason. > > > > > > The patch (call dw_pcie_msi_init from dw_msi_setup_irq) would be > > > > > > good. Thank you for your effort. > > > > > > > > > > > > Mohit, Pratyush, > > > > > > If you have different opinions, please let us know. :-) > > > > > > > > > > dw_msi_setup_irq will be called for each function which needs msi > > > > > assignment. However, dw_pcie_msi_init should be called only once. So, > > > > > in my opinion calling dw_pcie_msi_init from dw_msi_setup_irq would not > > > > > be the best option. > > > > > > > > > > @Bjørn, can you help us with tracing calling sequence of > > > > > dw_pcie_setup & dw_pcie_scan_bus. I think when you do "reset bridge", > > > > > it will call dw_pcie_setup and when you do "rescan bus", it will call > > > > > dw_pcie_scan_bus. If yes, then you can move dw_pcie_msi_init to > > > > > dw_pcie_setup. > > > > > > > > > > > > It looks like dw_pcie_setup and dw_pcie_scan_bus is only called when > > > > booting. Resetting the bridge or scanning the bus will not trigger any > > > > of these functions, unfortunately. > > > > > > Yes, I browsed pcie sysfs rescan and reset code and it does not go > > > into that path. Sorry for the wrong pointers. I should have looked > > > into code earlier :( > > > > > > Coming to the issue, I am still not convinced that msi_init part should > > > go to msi_setup_irq. May be something is missing. > > > @Mohit, Jingoo: How does remove, reset and rescan behave with your > > > platform. > > > > Any comments? > > Sorry for late response. > I tested 'remove, reset and rescan' on Exynos platform > as you did. > > (remove endpoints) > # echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove > # echo 1 > /sys/bus/pci/devices/0000:01:00.1/remove > > (reset bridge) > # echo 1 > /sys/bus/pci/devices/0000:00:00.0/reset > > (rescan bus) > # echo 1 > /sys/bus/pci/rescan > > Without MSI (legacy INTx mode), it works properly. However, > with MSI, it makes the problem. Oh, there was my mistake. There is no problem on Exynos platform. I tested two different LAN cards. With MSI, 'remove, reset and rescan' works properly on Exynos platform using the current pci/next tree. Sorry for the confusion. Thank you. Best regards, Jingoo Han > > > > > I can prepare a patch (which calls dw_pcie_msi_init from > > dw_msi_setup_irq), however if this is not the right solution then we > > need to figure out what a proper solution should look like. > > If you send the patch, I will test it on Exynos platform. > Thank you for your effort. :-) > > Best regards, > Jingoo Han -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html