Skip to contentSkip to conversation

r6040: check PHY status when bringing interface up

PATCH Applied Florian Fainelli 2 participants 2 messages Jan 7, 2009 – Jan 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 r6040: check PHY status when bringing interface up

From: Florian Fainelli <[email protected]>
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.

---

drivers/net/r6040.c +4 -0
index 3e685d7..a59efbd 100644
@@ -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;
maintainer Applied
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Wed, 7 Jan 2009 17:40:37 +0100

Quoted 7 lines

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.

Applied.