diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:55:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:55:08 -0500 |
commit | 6d6b89bd2e316b78d668f761d380837b81fa71ef (patch) | |
tree | 7e63c58611fc6181153526abbdafdd846ed1a19d /drivers/net/loopback.c | |
parent | 13dda80e48439b446d0bc9bab34b91484bc8f533 (diff) | |
parent | 2507c05ff55fbf38326b08ed27eaed233bc75042 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1341 commits)
virtio_net: remove forgotten assignment
be2net: fix tx completion polling
sis190: fix cable detect via link status poll
net: fix protocol sk_buff field
bridge: Fix build error when IGMP_SNOOPING is not enabled
bnx2x: Tx barriers and locks
scm: Only support SCM_RIGHTS on unix domain sockets.
vhost-net: restart tx poll on sk_sndbuf full
vhost: fix get_user_pages_fast error handling
vhost: initialize log eventfd context pointer
vhost: logging thinko fix
wireless: convert to use netdev_for_each_mc_addr
ethtool: do not set some flags, if others failed
ipoib: returned back addrlen check for mc addresses
netlink: Adding inode field to /proc/net/netlink
axnet_cs: add new id
bridge: Make IGMP snooping depend upon BRIDGE.
bridge: Add multicast count/interval sysfs entries
bridge: Add hash elasticity/max sysfs entries
bridge: Add multicast_snooping sysfs toggle
...
Trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index b9fcc9819837..72b7949c91b1 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -72,7 +72,8 @@ struct pcpu_lstats { | |||
72 | static netdev_tx_t loopback_xmit(struct sk_buff *skb, | 72 | static netdev_tx_t loopback_xmit(struct sk_buff *skb, |
73 | struct net_device *dev) | 73 | struct net_device *dev) |
74 | { | 74 | { |
75 | struct pcpu_lstats *pcpu_lstats, *lb_stats; | 75 | struct pcpu_lstats __percpu *pcpu_lstats; |
76 | struct pcpu_lstats *lb_stats; | ||
76 | int len; | 77 | int len; |
77 | 78 | ||
78 | skb_orphan(skb); | 79 | skb_orphan(skb); |
@@ -80,7 +81,7 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb, | |||
80 | skb->protocol = eth_type_trans(skb, dev); | 81 | skb->protocol = eth_type_trans(skb, dev); |
81 | 82 | ||
82 | /* it's OK to use per_cpu_ptr() because BHs are off */ | 83 | /* it's OK to use per_cpu_ptr() because BHs are off */ |
83 | pcpu_lstats = dev->ml_priv; | 84 | pcpu_lstats = (void __percpu __force *)dev->ml_priv; |
84 | lb_stats = this_cpu_ptr(pcpu_lstats); | 85 | lb_stats = this_cpu_ptr(pcpu_lstats); |
85 | 86 | ||
86 | len = skb->len; | 87 | len = skb->len; |
@@ -95,14 +96,14 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb, | |||
95 | 96 | ||
96 | static struct net_device_stats *loopback_get_stats(struct net_device *dev) | 97 | static struct net_device_stats *loopback_get_stats(struct net_device *dev) |
97 | { | 98 | { |
98 | const struct pcpu_lstats *pcpu_lstats; | 99 | const struct pcpu_lstats __percpu *pcpu_lstats; |
99 | struct net_device_stats *stats = &dev->stats; | 100 | struct net_device_stats *stats = &dev->stats; |
100 | unsigned long bytes = 0; | 101 | unsigned long bytes = 0; |
101 | unsigned long packets = 0; | 102 | unsigned long packets = 0; |
102 | unsigned long drops = 0; | 103 | unsigned long drops = 0; |
103 | int i; | 104 | int i; |
104 | 105 | ||
105 | pcpu_lstats = dev->ml_priv; | 106 | pcpu_lstats = (void __percpu __force *)dev->ml_priv; |
106 | for_each_possible_cpu(i) { | 107 | for_each_possible_cpu(i) { |
107 | const struct pcpu_lstats *lb_stats; | 108 | const struct pcpu_lstats *lb_stats; |
108 | 109 | ||
@@ -135,19 +136,20 @@ static const struct ethtool_ops loopback_ethtool_ops = { | |||
135 | 136 | ||
136 | static int loopback_dev_init(struct net_device *dev) | 137 | static int loopback_dev_init(struct net_device *dev) |
137 | { | 138 | { |
138 | struct pcpu_lstats *lstats; | 139 | struct pcpu_lstats __percpu *lstats; |
139 | 140 | ||
140 | lstats = alloc_percpu(struct pcpu_lstats); | 141 | lstats = alloc_percpu(struct pcpu_lstats); |
141 | if (!lstats) | 142 | if (!lstats) |
142 | return -ENOMEM; | 143 | return -ENOMEM; |
143 | 144 | ||
144 | dev->ml_priv = lstats; | 145 | dev->ml_priv = (void __force *)lstats; |
145 | return 0; | 146 | return 0; |
146 | } | 147 | } |
147 | 148 | ||
148 | static void loopback_dev_free(struct net_device *dev) | 149 | static void loopback_dev_free(struct net_device *dev) |
149 | { | 150 | { |
150 | struct pcpu_lstats *lstats = dev->ml_priv; | 151 | struct pcpu_lstats __percpu *lstats = |
152 | (void __percpu __force *)dev->ml_priv; | ||
151 | 153 | ||
152 | free_percpu(lstats); | 154 | free_percpu(lstats); |
153 | free_netdev(dev); | 155 | free_netdev(dev); |