* [PATCH 2/4] r6040: check PHY status when bringing interface up
@ 2009-01-07 16:40 Florian Fainelli
2009-01-08 19:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-01-07 16:40 UTC (permalink / raw)
To: David Miller, Jeff Garzik, netdev
From: Florian Fainelli <florian@openwrt.org>
Subject: [PATCH 2/4] 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: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 3e685d7..a59efbd 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -1107,6 +1107,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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-08 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 16:40 [PATCH 2/4] r6040: check PHY status when bringing interface up Florian Fainelli
2009-01-08 19:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).