* [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
@ 2025-06-13 18:51 David Thompson
2025-06-16 12:45 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2025-06-13 18:51 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, horms,
u.kleine-koenig
Cc: netdev, linux-kernel, David Thompson, Asmaa Mnebhi
The message "Error getting PHY irq. Use polling instead"
is emitted when the mlxbf_gige driver is loaded by the
kernel before the associated gpio-mlxbf driver, and thus
the call to get the PHY IRQ fails since it is not yet
available. The driver probe() must return -EPROBE_DEFER
if acpi_dev_gpio_irq_get_by() returns the same.
Signed-off-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
---
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index fb2e5b844c15..d76d7a945899 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -447,8 +447,10 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
priv->llu_plu_irq = platform_get_irq(pdev, MLXBF_GIGE_LLU_PLU_INTR_IDX);
phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy", 0);
- if (phy_irq < 0) {
- dev_err(&pdev->dev, "Error getting PHY irq. Use polling instead");
+ if (phy_irq == -EPROBE_DEFER) {
+ err = -EPROBE_DEFER;
+ goto out;
+ } else if (phy_irq < 0) {
phy_irq = PHY_POLL;
}
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
2025-06-13 18:51 [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available David Thompson
@ 2025-06-16 12:45 ` Simon Horman
2025-06-17 20:07 ` David Thompson
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2025-06-16 12:45 UTC (permalink / raw)
To: David Thompson
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, u.kleine-koenig,
netdev, linux-kernel, Asmaa Mnebhi
On Fri, Jun 13, 2025 at 06:51:29PM +0000, David Thompson wrote:
> The message "Error getting PHY irq. Use polling instead"
> is emitted when the mlxbf_gige driver is loaded by the
> kernel before the associated gpio-mlxbf driver, and thus
> the call to get the PHY IRQ fails since it is not yet
> available. The driver probe() must return -EPROBE_DEFER
> if acpi_dev_gpio_irq_get_by() returns the same.
>
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
Thanks David,
I as a bug fix this needs a Fixes tag, which you can add
by simply replying to this email.
Else we can treat it as an enhancement for net-next.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
2025-06-16 12:45 ` Simon Horman
@ 2025-06-17 20:07 ` David Thompson
2025-06-18 12:34 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2025-06-17 20:07 UTC (permalink / raw)
To: Simon Horman
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, u.kleine-koenig@baylibre.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Asmaa Mnebhi
> -----Original Message-----
> From: Simon Horman <horms@kernel.org>
> Sent: Monday, June 16, 2025 8:45 AM
> To: David Thompson <davthompson@nvidia.com>
> Cc: andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; u.kleine-koenig@baylibre.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Asmaa Mnebhi
> <asmaa@nvidia.com>
> Subject: Re: [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not
> available
>
> On Fri, Jun 13, 2025 at 06:51:29PM +0000, David Thompson wrote:
> > The message "Error getting PHY irq. Use polling instead"
> > is emitted when the mlxbf_gige driver is loaded by the kernel before
> > the associated gpio-mlxbf driver, and thus the call to get the PHY IRQ
> > fails since it is not yet available. The driver probe() must return
> > -EPROBE_DEFER if acpi_dev_gpio_irq_get_by() returns the same.
> >
> > Signed-off-by: David Thompson <davthompson@nvidia.com>
> > Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
>
> Thanks David,
>
> I as a bug fix this needs a Fixes tag, which you can add by simply replying to this
> email.
>
> Else we can treat it as an enhancement for net-next.
Yes, good point Simon.
This patch is a fix, so should have the following Fixes tag:
Fixes: 6c2a6ddca763 ("net: mellanox: mlxbf_gige: Replace non-standard interrupt handling")
Regards, Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
2025-06-17 20:07 ` David Thompson
@ 2025-06-18 12:34 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-06-18 12:34 UTC (permalink / raw)
To: David Thompson
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, u.kleine-koenig@baylibre.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Asmaa Mnebhi
On Tue, Jun 17, 2025 at 08:07:37PM +0000, David Thompson wrote:
> > -----Original Message-----
> > From: Simon Horman <horms@kernel.org>
> > Sent: Monday, June 16, 2025 8:45 AM
> > To: David Thompson <davthompson@nvidia.com>
> > Cc: andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
> > kuba@kernel.org; pabeni@redhat.com; u.kleine-koenig@baylibre.com;
> > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Asmaa Mnebhi
> > <asmaa@nvidia.com>
> > Subject: Re: [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not
> > available
> >
> > On Fri, Jun 13, 2025 at 06:51:29PM +0000, David Thompson wrote:
> > > The message "Error getting PHY irq. Use polling instead"
> > > is emitted when the mlxbf_gige driver is loaded by the kernel before
> > > the associated gpio-mlxbf driver, and thus the call to get the PHY IRQ
> > > fails since it is not yet available. The driver probe() must return
> > > -EPROBE_DEFER if acpi_dev_gpio_irq_get_by() returns the same.
> > >
> > > Signed-off-by: David Thompson <davthompson@nvidia.com>
> > > Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
> >
> > Thanks David,
> >
> > I as a bug fix this needs a Fixes tag, which you can add by simply replying to this
> > email.
> >
> > Else we can treat it as an enhancement for net-next.
>
> Yes, good point Simon.
>
> This patch is a fix, so should have the following Fixes tag:
> Fixes: 6c2a6ddca763 ("net: mellanox: mlxbf_gige: Replace non-standard interrupt handling")
Thanks David,
I notice that in the meantime that this has been marked as Changes Requested
in patchwork. Presumably due to my earlier comment about a Fixes tag.
Could you post a v2 with the Fixes tag?
Feel free to also include
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-18 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 18:51 [PATCH net v1] mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available David Thompson
2025-06-16 12:45 ` Simon Horman
2025-06-17 20:07 ` David Thompson
2025-06-18 12:34 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).