| To: | Netdev <netdev@xxxxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx> |
|---|---|
| Subject: | mv643xx(18/20): Isolate the PHY at device close |
| From: | "Dale Farnsworth" <dale@xxxxxxxxxxxxxx> |
| Date: | Mon, 28 Mar 2005 16:59:26 -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: James Chapman <jchapman@xxxxxxxxxxx>
Acked-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
@@ -591,6 +591,12 @@
mv643xx_eth_write_smi_reg(dev, MII_BMCR, phy_reg_data | BMCR_RESET);
}
+static void mv643xx_eth_phy_isolate(struct net_device *dev)
+{
+ /* Isolate the PHY (force link down) */
+ mv643xx_eth_write_smi_reg(dev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE);
+}
+
/*
* This function prepares the ethernet port to start its activity:
* 1) Completes the ethernet port driver struct initialization toward port
@@ -2210,6 +2216,9 @@
mv643xx_eth_real_stop(dev);
+ /* Isolate the PHY from the network (force link down) */
+ mv643xx_eth_phy_isolate(dev);
+
free_irq(dev->irq, dev);
spin_unlock_irq(&mp->lock);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | mv643xx(17/20): Reset the PHY only at driver open time, Dale Farnsworth |
|---|---|
| Next by Date: | mv643xx(19/20): Ensure NAPI poll routine only clears IRQs it handles, Dale Farnsworth |
| Previous by Thread: | mv643xx(17/20): Reset the PHY only at driver open time, Dale Farnsworth |
| Next by Thread: | mv643xx(19/20): Ensure NAPI poll routine only clears IRQs it handles, Dale Farnsworth |
| Indexes: | [Date] [Thread] [Top] [All Lists] |