Thread (25 messages) 25 messages, 4 authors, 2005-08-24

mv643xx(17/20): Reset the PHY only at driver open time

From: Dale Farnsworth <hidden>
Date: 2005-03-28 23:58:54

Signed-off-by: Dale Farnsworth <redacted>

Index: linux-2.5-enet/drivers/net/mv643xx_eth.c
===================================================================
--- linux-2.5-enet.orig/drivers/net/mv643xx_eth.c
+++ linux-2.5-enet/drivers/net/mv643xx_eth.c
@@ -587,10 +587,8 @@
 {
 	unsigned int phy_reg_data;
 
-	/* Reset the PHY */
-	mv643xx_eth_read_smi_reg(dev, 0, &phy_reg_data);
-	phy_reg_data |= 0x8000;	/* Set bit 15 to reset the PHY */
-	mv643xx_eth_write_smi_reg(dev, 0, phy_reg_data);
+	mv643xx_eth_read_smi_reg(dev, MII_BMCR, &phy_reg_data);
+	mv643xx_eth_write_smi_reg(dev, MII_BMCR, phy_reg_data | BMCR_RESET);
 }
 
 /*
@@ -618,8 +616,6 @@
 	mv643xx_eth_port_reset(dev);
 
 	mv643xx_eth_port_init_mac_tables(dev);
-
-	mv643xx_eth_phy_reset(dev);
 }
 
 static inline u32 mv643xx_eth_read_mib_counter(struct net_device *dev,
@@ -2173,6 +2169,8 @@
 
 	spin_lock_irq(&mp->lock);
 
+	mv643xx_eth_phy_reset(dev);
+
 	err = request_irq(dev->irq, mv643xx_eth_int_handler,
 			  SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help