Thread (14 messages) 14 messages, 6 authors, 2020-12-02

Re: [PATCH v2 2/2] net: dsa: qca: ar9331: export stats64

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-12-02 15:12:25
Also in: linux-mips, lkml

quoted hunk ↗ jump to hunk
@@ -422,6 +527,7 @@ static void ar9331_sw_phylink_mac_link_down(struct dsa_switch *ds, int port,
 					    phy_interface_t interface)
 {
 	struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv;
+	struct ar9331_sw_port *p = &priv->port[port];
 	struct regmap *regmap = priv->regmap;
 	int ret;
 
@@ -429,6 +535,8 @@ static void ar9331_sw_phylink_mac_link_down(struct dsa_switch *ds, int port,
 				 AR9331_SW_PORT_STATUS_MAC_MASK, 0);
 	if (ret)
 		dev_err_ratelimited(priv->dev, "%s: %i\n", __func__, ret);
+
+	cancel_delayed_work_sync(&p->mib_read);
 }
You could update the stats here, after the interface is down. You then
know the stats are actually up to date and correct!

     Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help