Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265198
b: refs/heads/master
c: c1abc95
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Kirsher committed Aug 11, 2011
1 parent d34f2d7 commit b544ab8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9de79c127cccecb11ae6a21ab1499e87aa222880
refs/heads/master: c1abc95b157fe4574919942018af143203ecca8e
2 changes: 2 additions & 0 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ source "drivers/net/phy/Kconfig"
# Ethernet
#

source "drivers/net/ethernet/Kconfig"

menuconfig NET_ETHERNET
bool "Ethernet (10 or 100Mbit)"
depends on !UML
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Makefile for the Linux network (ethercard) device drivers.
# Makefile for the Linux network device drivers.
#

obj-$(CONFIG_MII) += mii.o
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/ethernet/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Ethernet LAN device configuration
#

menuconfig ETHERNET
bool "Ethernet driver support"
depends on NET
default y
---help---
This section contains all the Ethernet device drivers.

if ETHERNET

endif # ETHERNET
3 changes: 3 additions & 0 deletions trunk/drivers/net/ethernet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Makefile for the Linux network Ethernet device drivers.
#
15 changes: 5 additions & 10 deletions trunk/net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
dst_init_metrics(dst, dst_default_metrics, true);
dst->expires = 0UL;
dst->path = dst;
RCU_INIT_POINTER(dst->_neighbour, NULL);
dst->_neighbour = NULL;
#ifdef CONFIG_XFRM
dst->xfrm = NULL;
#endif
Expand Down Expand Up @@ -229,11 +229,11 @@ struct dst_entry *dst_destroy(struct dst_entry * dst)
smp_rmb();

again:
neigh = rcu_dereference_protected(dst->_neighbour, 1);
neigh = dst->_neighbour;
child = dst->child;

if (neigh) {
RCU_INIT_POINTER(dst->_neighbour, NULL);
dst->_neighbour = NULL;
neigh_release(neigh);
}

Expand Down Expand Up @@ -360,19 +360,14 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
if (!unregister) {
dst->input = dst->output = dst_discard;
} else {
struct neighbour *neigh;

dst->dev = dev_net(dst->dev)->loopback_dev;
dev_hold(dst->dev);
dev_put(dev);
rcu_read_lock();
neigh = dst_get_neighbour(dst);
if (neigh && neigh->dev == dev) {
neigh->dev = dst->dev;
if (dst->_neighbour && dst->_neighbour->dev == dev) {
dst->_neighbour->dev = dst->dev;
dev_hold(dst->dev);
dev_put(dev);
}
rcu_read_unlock();
}
}

Expand Down

0 comments on commit b544ab8

Please sign in to comment.