Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: watchdog: rename __dev_watchdog_up() and dev_watchdog_down()

In commit d7811e623dd4 ("[NET]: Drop tx lock in dev_watchdog_up")
dev_watchdog_up() became a simple wrapper for __netdev_watchdog_up()

Herbert also said : "In 2.6.19 we can eliminate the unnecessary
__dev_watchdog_up and replace it with dev_watchdog_up."

This patch consolidates things to have only two functions, with
a common prefix.

- netdev_watchdog_up(), exported for the sake of one freescale driver.
This replaces __netdev_watchdog_up() and dev_watchdog_up().

- netdev_watchdog_down(), static to net/sched/sch_generic.c
This replaces dev_watchdog_down().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250105090924.1661822-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
1b960cd1 a8a65311

+17 -22
+1 -1
drivers/net/ethernet/freescale/ucc_geth.c
··· 1434 1434 1435 1435 /* allow to xmit again */ 1436 1436 netif_tx_wake_all_queues(ugeth->ndev); 1437 - __netdev_watchdog_up(ugeth->ndev); 1437 + netdev_watchdog_up(ugeth->ndev); 1438 1438 } 1439 1439 1440 1440 /* Initialize TBI PHY interface for communicating with the
+1 -1
include/linux/netdevice.h
··· 4295 4295 4296 4296 unsigned long dev_trans_start(struct net_device *dev); 4297 4297 4298 - void __netdev_watchdog_up(struct net_device *dev); 4298 + void netdev_watchdog_up(struct net_device *dev); 4299 4299 4300 4300 void netif_carrier_on(struct net_device *dev); 4301 4301 void netif_carrier_off(struct net_device *dev);
+1 -1
net/core/dev.c
··· 3233 3233 if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) && 3234 3234 netif_running(dev)) { 3235 3235 netif_tx_wake_all_queues(dev); 3236 - __netdev_watchdog_up(dev); 3236 + netdev_watchdog_up(dev); 3237 3237 } 3238 3238 } 3239 3239 EXPORT_SYMBOL(netif_device_attach);
+14 -19
net/sched/sch_generic.c
··· 551 551 netdev_put(dev, &dev->watchdog_dev_tracker); 552 552 } 553 553 554 - void __netdev_watchdog_up(struct net_device *dev) 554 + void netdev_watchdog_up(struct net_device *dev) 555 555 { 556 - if (dev->netdev_ops->ndo_tx_timeout) { 557 - if (dev->watchdog_timeo <= 0) 558 - dev->watchdog_timeo = 5*HZ; 559 - if (!mod_timer(&dev->watchdog_timer, 560 - round_jiffies(jiffies + dev->watchdog_timeo))) 561 - netdev_hold(dev, &dev->watchdog_dev_tracker, 562 - GFP_ATOMIC); 563 - } 556 + if (!dev->netdev_ops->ndo_tx_timeout) 557 + return; 558 + if (dev->watchdog_timeo <= 0) 559 + dev->watchdog_timeo = 5*HZ; 560 + if (!mod_timer(&dev->watchdog_timer, 561 + round_jiffies(jiffies + dev->watchdog_timeo))) 562 + netdev_hold(dev, &dev->watchdog_dev_tracker, 563 + GFP_ATOMIC); 564 564 } 565 - EXPORT_SYMBOL_GPL(__netdev_watchdog_up); 565 + EXPORT_SYMBOL_GPL(netdev_watchdog_up); 566 566 567 - static void dev_watchdog_up(struct net_device *dev) 568 - { 569 - __netdev_watchdog_up(dev); 570 - } 571 - 572 - static void dev_watchdog_down(struct net_device *dev) 567 + static void netdev_watchdog_down(struct net_device *dev) 573 568 { 574 569 netif_tx_lock_bh(dev); 575 570 if (del_timer(&dev->watchdog_timer)) ··· 586 591 atomic_inc(&dev->carrier_up_count); 587 592 linkwatch_fire_event(dev); 588 593 if (netif_running(dev)) 589 - __netdev_watchdog_up(dev); 594 + netdev_watchdog_up(dev); 590 595 } 591 596 } 592 597 EXPORT_SYMBOL(netif_carrier_on); ··· 1262 1267 1263 1268 if (need_watchdog) { 1264 1269 netif_trans_update(dev); 1265 - dev_watchdog_up(dev); 1270 + netdev_watchdog_up(dev); 1266 1271 } 1267 1272 } 1268 1273 EXPORT_SYMBOL(dev_activate); ··· 1361 1366 dev_deactivate_queue(dev, dev_ingress_queue(dev), 1362 1367 &noop_qdisc); 1363 1368 1364 - dev_watchdog_down(dev); 1369 + netdev_watchdog_down(dev); 1365 1370 } 1366 1371 1367 1372 /* Wait for outstanding qdisc-less dev_queue_xmit calls or