提交 84314bf9 编写于 作者: F Florian Fainelli 提交者: David S. Miller

r6040: check PHY status when bringing interface up

This patch makes the driver properly initialize the PHY
status if not correctly set by the bootloader/BIOS.
It prevents some boards to bring up the link on boot.
Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9a48ce84
......@@ -1121,6 +1121,10 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
err = -EIO;
goto err_out_free_res;
}
/* If PHY status change register is still set to zero it means the
* bootloader didn't initialize it */
if (ioread16(ioaddr + PHY_CC) == 0)
iowrite16(0x9f07, ioaddr + PHY_CC);
/* Init system & device */
lp->base = ioaddr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册