Skip to content

Commit a938fc8

Browse files
dthompsoNipaLocal
authored and
NipaLocal
committed
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. Signed-off-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: NipaLocal <nipa@local>
1 parent ac102b9 commit a938fc8

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
@@ -457,8 +457,10 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
457457
priv->llu_plu_irq = platform_get_irq(pdev, MLXBF_GIGE_LLU_PLU_INTR_IDX);
458458

459459
phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy", 0);
460-
if (phy_irq < 0) {
461-
dev_err(&pdev->dev, "Error getting PHY irq. Use polling instead");
460+
if (phy_irq == -EPROBE_DEFER) {
461+
err = -EPROBE_DEFER;
462+
goto out;
463+
} else if (phy_irq < 0) {
462464
phy_irq = PHY_POLL;
463465
}
464466

0 commit comments

Comments
 (0)