diff mbox series

[v5,-next,08/11] PCI: brcmstb: Adding a softdep to MIP MSI-X driver

Message ID 20250120130119.671119-9-svarbanov@suse.de (mailing list archive)
State Superseded
Delegated to: Krzysztof WilczyƄski
Headers show
Series Add PCIe support for bcm2712 | expand

Commit Message

Stanimir Varbanov Jan. 20, 2025, 1:01 p.m. UTC
In case brcmstb PCIe driver and MIP MSI-X interrupt controller
drivers are built as modules there could be a race in probing.
To avoid this add a softdep to MIP driver to guarantee that MIP
driver will be load first.

Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
---
v4 -> v5:
 - New patch in the series.

 drivers/pci/controller/pcie-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Florian Fainelli Jan. 21, 2025, 6:29 p.m. UTC | #1
On 1/20/25 05:01, Stanimir Varbanov wrote:
> In case brcmstb PCIe driver and MIP MSI-X interrupt controller
> drivers are built as modules there could be a race in probing.
> To avoid this add a softdep to MIP driver to guarantee that MIP
> driver will be load first.
> 
> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Bjorn Helgaas Feb. 21, 2025, 9:40 p.m. UTC | #2
On Mon, Jan 20, 2025 at 03:01:16PM +0200, Stanimir Varbanov wrote:
> In case brcmstb PCIe driver and MIP MSI-X interrupt controller
> drivers are built as modules there could be a race in probing.
> To avoid this add a softdep to MIP driver to guarantee that MIP
> driver will be load first.

Maybe this one too?  Should this be moved to after the irq_bcm2712_mip
driver is added, but before brcmstb will claim bcm2712?  I just want
to avoid bisection problems when possible, and it sounds like if we
lose the race, interrupts might not work as expected?
> 
> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
> ---
> v4 -> v5:
>  - New patch in the series.
> 
>  drivers/pci/controller/pcie-brcmstb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 03396a9d97be..744fe1a4cf9c 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -1997,3 +1997,4 @@ module_platform_driver(brcm_pcie_driver);
>  MODULE_LICENSE("GPL");
>  MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
>  MODULE_AUTHOR("Broadcom");
> +MODULE_SOFTDEP("pre: irq_bcm2712_mip");
> -- 
> 2.47.0
>
Stanimir Varbanov Feb. 23, 2025, 9:58 a.m. UTC | #3
Hi Bjorn,

On 2/21/25 11:40 PM, Bjorn Helgaas wrote:
> On Mon, Jan 20, 2025 at 03:01:16PM +0200, Stanimir Varbanov wrote:
>> In case brcmstb PCIe driver and MIP MSI-X interrupt controller
>> drivers are built as modules there could be a race in probing.
>> To avoid this add a softdep to MIP driver to guarantee that MIP
>> driver will be load first.
> 
> Maybe this one too?  Should this be moved to after the irq_bcm2712_mip
> driver is added, but before brcmstb will claim bcm2712?  I just want
> to avoid bisection problems when possible, and it sounds like if we
> lose the race, interrupts might not work as expected?

Makes sense, thank you.

~Stan
diff mbox series

Patch

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 03396a9d97be..744fe1a4cf9c 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1997,3 +1997,4 @@  module_platform_driver(brcm_pcie_driver);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
 MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");