Skip to contentSkip to conversation

net: sched: export __netdev_watchdog_up()

PATCH Superseded Valentin Longchamp 2 participants 3 messages Jun 9, 2020

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 net: sched: export __netdev_watchdog_up()

Since the quiesce/activate rework, __netdev_watchdog_up() is directly called in the ucc_geth driver.

Unfortunately, this function is not available for modules and thus ucc_geth cannot be built as a module anymore. Fix it by exporting __netdev_watchdog_up().

Since the commit introducing the regression was backported to stable branches, this one should ideally be as well.

Fixes 79dde73cf9bc ("net/ethernet/freescale: rework quiesce/activate for ucc_geth")
---
 net/sched/sch_generic.c | 1 +
 1 file changed, 1 insertion(+)
net/sched/sch_generic.c +1 -0
index b19a0021a0bd..265a61d011df 100644
@@ -464,6 +464,7 @@ void __netdev_watchdog_up(struct net_device *dev)
 			dev_hold(dev);
 	}
 }
+EXPORT_SYMBOL_GPL(__netdev_watchdog_up);
 
 static void dev_watchdog_up(struct net_device *dev)
 {
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 2/2 net: sched: make the watchdog functions more coherent

Remove dev_watchdog_up() that directly called __netdev_watchdog_up() and rename dev_watchdog_down() to __netdev_watchdog_down() for symmetry.

---
 net/sched/sch_generic.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
net/sched/sch_generic.c +3 -8
index 265a61d011df..b4d5548492ec 100644
@@ -466,12 +466,7 @@ void __netdev_watchdog_up(struct net_device *dev)
 }
 EXPORT_SYMBOL_GPL(__netdev_watchdog_up);
 
-static void dev_watchdog_up(struct net_device *dev)
-{
-	__netdev_watchdog_up(dev);
-}
-
-static void dev_watchdog_down(struct net_device *dev)
+static void __netdev_watchdog_down(struct net_device *dev)
 {
 	netif_tx_lock_bh(dev);
 	if (del_timer(&dev->watchdog_timer))
@@ -1124,7 +1119,7 @@ void dev_activate(struct net_device *dev)
 
 	if (need_watchdog) {
 		netif_trans_update(dev);
-		dev_watchdog_up(dev);
+		__netdev_watchdog_up(dev);
 	}
 }
 EXPORT_SYMBOL(dev_activate);
@@ -1210,7 +1205,7 @@ void dev_deactivate_many(struct list_head *head)
 			dev_deactivate_queue(dev, dev_ingress_queue(dev),
 					     &noop_qdisc);
 
-		dev_watchdog_down(dev);
+		__netdev_watchdog_down(dev);
 	}
 
 	/* Wait for outstanding qdisc-less dev_queue_xmit calls.
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [PATCH v2 2/2] net: sched: make the watchdog functions more coherent

This is inappropriate to submit during the merge window as net-next is closed and only bug fixes should be submitted at this time.

Your submission was perfect initially, just adding the necessary symbol export to fix the ucc_geth build when modular. Please don't tinker and add cleanups for a bug fix like this.

Thank you.