Skip to content

Commit e7ea5f5

Browse files
dthompsokuba-moo
authored andcommitted
mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
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. Fixes: 6c2a6dd ("net: mellanox: mlxbf_gige: Replace non-standard interrupt handling") Signed-off-by: David Thompson <[email protected]> Reviewed-by: Asmaa Mnebhi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 78bd03e commit e7ea5f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,10 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
447447
priv->llu_plu_irq = platform_get_irq(pdev, MLXBF_GIGE_LLU_PLU_INTR_IDX);
448448

449449
phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy", 0);
450-
if (phy_irq < 0) {
451-
dev_err(&pdev->dev, "Error getting PHY irq. Use polling instead");
450+
if (phy_irq == -EPROBE_DEFER) {
451+
err = -EPROBE_DEFER;
452+
goto out;
453+
} else if (phy_irq < 0) {
452454
phy_irq = PHY_POLL;
453455
}
454456

0 commit comments

Comments
 (0)