[SRU][J:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available

David Thompson davthompson at nvidia.com
Thu Jul 17 22:01:06 UTC 2025


BugLink: https://bugs.launchpad.net/bugs/2117197

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 at 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 097dccb7b550..884cb2545de9 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -604,8 +604,10 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 		phy_irq = PHY_POLL;
 	} else {
 		phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy-gpios", 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




More information about the kernel-team mailing list