| To: | Netdev <netdev@xxxxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx> |
|---|---|
| Subject: | mv643xx(17/20): Reset the PHY only at driver open time |
| From: | "Dale Farnsworth" <dale@xxxxxxxxxxxxxx> |
| Date: | Mon, 28 Mar 2005 16:58:54 -0700 |
| Cc: | Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Manish Lachwani <mlachwani@xxxxxxxxxx>, Brian Waite <brian@xxxxxxxxxxxxxx>, "Steven J. Hill" <sjhill@xxxxxxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, James Chapman <jchapman@xxxxxxxxxxx> |
| In-reply-to: | <20050328233807.GA28423@xyzzy> |
| References: | <20050328233807.GA28423@xyzzy> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6+20040907i |
Signed-off-by: Dale Farnsworth <dale@xxxxxxxxxxxxxx>
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);
|
| Previous by Date: | mv643xx(16/20): Limit MTU to 1500 bytes unless connected at GigE speed, Dale Farnsworth |
|---|---|
| Next by Date: | mv643xx(18/20): Isolate the PHY at device close, Dale Farnsworth |
| Previous by Thread: | Re: mv643xx(16/20): Limit MTU to 1500 bytes unless connected at GigE speed, Dale Farnsworth |
| Next by Thread: | mv643xx(18/20): Isolate the PHY at device close, Dale Farnsworth |
| Indexes: | [Date] [Thread] [Top] [All Lists] |