Skip to content

Commit

Permalink
net: stmmac: set phy to use polling by default
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dinh Nguyen authored and David S. Miller committed Apr 30, 2014
1 parent 6ebbc1a commit cc80ee1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc80ee1

Please sign in to comment.