提交 cc80ee13 编写于 作者: D Dinh Nguyen 提交者: David S. Miller

net: stmmac: set phy to use polling by default

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: NDinh Nguyen <dinguyen@altera.com>
Tested-by: NVince Bridgers <vbridger@altera.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ebbc1a6
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册