Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 839
b: refs/heads/master
c: cacaddf
h: refs/heads/master
i:
  837: b6519d6
  835: 12682c4
  831: bdff3b8
v: v3
  • Loading branch information
Tommy S. Christensen authored and David S. Miller committed May 3, 2005
1 parent e3f228d commit 0b172cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f4821e7b93fe72e89b8ff393bd8e705bd178aa5
refs/heads/master: cacaddf57ed4d5ca994e9a7e2bd5558061f5d89d
7 changes: 7 additions & 0 deletions trunk/net/core/link_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/netdevice.h>
#include <linux/if.h>
#include <net/sock.h>
#include <net/pkt_sched.h>
#include <linux/rtnetlink.h>
#include <linux/jiffies.h>
#include <linux/spinlock.h>
Expand Down Expand Up @@ -74,6 +75,12 @@ void linkwatch_run_queue(void)
clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state);

if (dev->flags & IFF_UP) {
if (netif_carrier_ok(dev)) {
WARN_ON(dev->qdisc_sleeping == &noop_qdisc);
dev_activate(dev);
} else
dev_deactivate(dev);

netdev_state_change(dev);
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ void dev_activate(struct net_device *dev)
write_unlock_bh(&qdisc_tree_lock);
}

if (!netif_carrier_ok(dev))
/* Delay activation until next carrier-on event */
return;

spin_lock_bh(&dev->queue_lock);
rcu_assign_pointer(dev->qdisc, dev->qdisc_sleeping);
if (dev->qdisc != &noqueue_qdisc) {
Expand Down

0 comments on commit 0b172cd

Please sign in to comment.