Message ID | 1398794181-17852-1-git-send-email-dinguyen@altera.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: <dinguyen@altera.com> Date: Tue, 29 Apr 2014 12:56:21 -0500 > From: Dinh Nguyen <dinguyen@altera.com> > > mii_irq[] array is never initialized anywhere in the driver, thus mii_irq[] > will always equate to zero. So, for the case where the PHY does not have an > irq, we should use PHY_POLL for that situation. > > Signed-off-by: Dinh Nguyen <dinguyen@altera.com> > Tested-by: Vince Bridgers <vbridger@altera.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index a468eb1..a5b1e1b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -205,10 +205,13 @@ int stmmac_mdio_register(struct net_device *ndev) if (new_bus == NULL) return -ENOMEM; - if (mdio_bus_data->irqs) + if (mdio_bus_data->irqs) { irqlist = mdio_bus_data->irqs; - else + } else { + for (addr = 0; addr < PHY_MAX_ADDR; addr++) + priv->mii_irq[addr] = PHY_POLL; irqlist = priv->mii_irq; + } #ifdef CONFIG_OF if (priv->device->of_node)