Skip to contentSkip to conversation

skge: restore device multicast membership after link down/up

PATCH New Andy Gospodarek 2 participants 3 messages Nov 30, 2006 – Dec 1, 2006

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

PATCH 1/1 skge: restore device multicast membership after link down/up

Yukon hardware will lose multicast membership data and promiscuous mode information if a link is disconnected and reconnected without taking the interface down. A call to yukon_reset in yukon_link_down will clear the hardware's multicast list, so it needs to be added back on link_up.

It does not appear that Genesis hardware needs a similar patch is needed since it does not seem to clear multicast membership when taking the link down.

---

 skge.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/net/skge.c +4 -0
index 3f1b72e..c02e1f1 100644
@@ -1922,6 +1922,10 @@ static void yukon_link_up(struct skge_po
 	gma_write16(hw, port, GM_GP_CTRL, reg);
 
 	gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_IS_DEF_MSK);
+
+	/* reset multicast list */
+	yukon_set_multicast(skge->netdev);
+
 	skge_link_up(skge);
 }
 
#1 lore raw

PATCH 1/1 skge: don't clear MC state on link down

I would rather fix Andy's problem by not clearing
multicast information on link down.

Also, add code to restore multicast state after ethtool phy reset.

---
 drivers/net/skge.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/net/skge.c +2 -3
index b294903..010fc65 100644
@@ -2154,8 +2154,6 @@ static void yukon_link_down(struct skge_
 	int port = skge->port;
 	u16 ctrl;
 
-	gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0);
-
 	ctrl = gma_read16(hw, port, GM_GP_CTRL);
 	ctrl &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
 	gma_write16(hw, port, GM_GP_CTRL, ctrl);
@@ -2167,7 +2165,6 @@ static void yukon_link_down(struct skge_
 		gm_phy_write(hw, port, PHY_MARV_AUNE_ADV, ctrl);
 	}
 
-	yukon_reset(hw, port);
 	skge_link_down(skge);
 
 	yukon_init(hw, port);
@@ -2268,6 +2265,8 @@ static void skge_phy_reset(struct skge_p
 		yukon_init(hw, port);
 	}
 	mutex_unlock(&hw->phy_mutex);
+
+	dev->set_multicast_list(dev);
 }
 
 /* Basic MII support */
Signature · 1 line
1.4.1
#2 lore raw

Re: [PATCH] skge: don't clear MC state on link down

Quoted 5 lines · Stephen Hemminger

I would rather fix Andy's problem by not clearing
multicast information on link down.

Also, add code to restore multicast state after ethtool phy reset.

Stephen,

I'll ACK that change instead as long as we can be sure that this isn't needed for hardware reasons.

-andy