Skip to contentSkip to conversation

r6040: invoke phy_{start,stop} when appropriate

PATCH Applied Florian Fainelli 3 participants 4 messages Oct 7, 2011 – Oct 10, 2011

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

PATCH 1/2 r6040: invoke phy_{start,stop} when appropriate

Joe reported to me that right after a bring up of a r6040 interface the ethtool output had no consistent output with respect to link duplex and speed. Fix this by adding a missing phy_start call in r6040_up and conversely a phy_stop call in r6040_down to properly initialize phy states.

---

drivers/net/ethernet/rdc/r6040.c +4 -0
index 2bbadc0..a128c3d 100644
@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
 	iowrite16(adrp[0], ioaddr + MID_0L);
 	iowrite16(adrp[1], ioaddr + MID_0M);
 	iowrite16(adrp[2], ioaddr + MID_0H);
+
+	phy_stop(lp->phydev);
 }
 
 static int r6040_close(struct net_device *dev)
@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
 	/* Initialize all MAC registers */
 	r6040_init_mac_regs(dev);
 
+	phy_start(lp->phydev);
+
 	return 0;
 }
 
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 22 lines · Florian Fainelli

Joe reported to me that right after a bring up of a r6040 interface the ethtool output had no consistent output with respect to link duplex and speed. Fix this by adding a missing phy_start call in r6040_up and conversely a phy_stop call in r6040_down to properly initialize phy states.

---

drivers/net/ethernet/rdc/r6040.c +2 -0
index 2bbadc0..a128c3d 100644
@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
 	iowrite16(adrp[0], ioaddr + MID_0L);
 	iowrite16(adrp[1], ioaddr + MID_0M);
 	iowrite16(adrp[2], ioaddr + MID_0H);
+
+	phy_stop(lp->phydev);
 }
 
 static int r6040_close(struct net_device *dev)

drivers/net/ethernet/rdc/r6040.c static int r6040_up(struct net_device *dev) · line 736

Quoted 8 lines
drivers/net/ethernet/rdc/r6040.c +2 -0
@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
 	/* Initialize all MAC registers */
 	r6040_init_mac_regs(dev);
 
+	phy_start(lp->phydev);
+
 	return 0;
 }
 

You dont need to submit your patches twice (net and net-next)

If its a bug fix, base your patch against net tree

If its a new feature, against net-next

#2 lore raw
Quoted 37 lines · On Friday 07 October 2011 12:24:47 Eric Dumazet wrote:
Quoted 36 lines · Florian Fainelli

Joe reported to me that right after a bring up of a r6040 interface the ethtool output had no consistent output with respect to link duplex and speed. Fix this by adding a missing phy_start call in r6040_up and conversely a phy_stop call in r6040_down to properly initialize phy states.

---

(quoted diff) +0 -0

b/drivers/net/ethernet/rdc/r6040.c index 2bbadc0..a128c3d 100644

drivers/net/ethernet/rdc/r6040.c +2 -0
@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
 
 	iowrite16(adrp[0], ioaddr + MID_0L);
 	iowrite16(adrp[1], ioaddr + MID_0M);
 	iowrite16(adrp[2], ioaddr + MID_0H);
 
+
+	phy_stop(lp->phydev);
 

}

static int r6040_close(struct net_device *dev)

drivers/net/ethernet/rdc/r6040.c +2 -0
@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
 
 	/* Initialize all MAC registers */
 	r6040_init_mac_regs(dev);
 
+	phy_start(lp->phydev);
+
 
 	return 0;
Quoted 7 lines
Quoted 1 line

}

You dont need to submit your patches twice (net and net-next)

If its a bug fix, base your patch against net tree

If its a new feature, against net-next

Allright, thanks for the tip. I just thought that would make it easier for David to get this applied (especially after the drivers reorganization).

Signature · 1 line
Florian
maintainer Applied
#3 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Fri, 7 Oct 2011 11:36:22 +0200

Quoted 7 lines

Joe reported to me that right after a bring up of a r6040 interface the ethtool output had no consistent output with respect to link duplex and speed. Fix this by adding a missing phy_start call in r6040_up and conversely a phy_stop call in r6040_down to properly initialize phy states.

Applied.