Skip to content

Commit

Permalink
r6040: check PHY status when bringing interface up
Browse files Browse the repository at this point in the history
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: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Jan 8, 2009
1 parent 9a48ce8 commit 84314bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84314bf

Please sign in to comment.