diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-17 17:33:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-17 17:33:11 -0400 |
commit | 9cbc94eabb0791906051bbfac024ef2c2be8e079 (patch) | |
tree | 41ba194e687c6c60f5c883f98737ac83257d0c00 /net/core/dev.c | |
parent | 1d1652cbdb9885e4d73972263e4cdbe1b0beebfe (diff) | |
parent | 7cc31a9ae1477abc79d5992b3afe889f25c50c99 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/vmxnet3/vmxnet3_ethtool.c
net/core/dev.c
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 3ed09f8ecbf8..155de2094e71 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1007,7 +1007,7 @@ rollback: | |||
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | write_lock_bh(&dev_base_lock); | 1009 | write_lock_bh(&dev_base_lock); |
1010 | hlist_del(&dev->name_hlist); | 1010 | hlist_del_rcu(&dev->name_hlist); |
1011 | write_unlock_bh(&dev_base_lock); | 1011 | write_unlock_bh(&dev_base_lock); |
1012 | 1012 | ||
1013 | synchronize_rcu(); | 1013 | synchronize_rcu(); |
@@ -5196,27 +5196,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5196 | /* Fix illegal checksum combinations */ | 5196 | /* Fix illegal checksum combinations */ |
5197 | if ((features & NETIF_F_HW_CSUM) && | 5197 | if ((features & NETIF_F_HW_CSUM) && |
5198 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5198 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5199 | netdev_info(dev, "mixed HW and IP checksum settings.\n"); | 5199 | netdev_warn(dev, "mixed HW and IP checksum settings.\n"); |
5200 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); | 5200 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); |
5201 | } | 5201 | } |
5202 | 5202 | ||
5203 | if ((features & NETIF_F_NO_CSUM) && | 5203 | if ((features & NETIF_F_NO_CSUM) && |
5204 | (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5204 | (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5205 | netdev_info(dev, "mixed no checksumming and other settings.\n"); | 5205 | netdev_warn(dev, "mixed no checksumming and other settings.\n"); |
5206 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); | 5206 | features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); |
5207 | } | 5207 | } |
5208 | 5208 | ||
5209 | /* Fix illegal SG+CSUM combinations. */ | 5209 | /* Fix illegal SG+CSUM combinations. */ |
5210 | if ((features & NETIF_F_SG) && | 5210 | if ((features & NETIF_F_SG) && |
5211 | !(features & NETIF_F_ALL_CSUM)) { | 5211 | !(features & NETIF_F_ALL_CSUM)) { |
5212 | netdev_info(dev, | 5212 | netdev_dbg(dev, |
5213 | "Dropping NETIF_F_SG since no checksum feature.\n"); | 5213 | "Dropping NETIF_F_SG since no checksum feature.\n"); |
5214 | features &= ~NETIF_F_SG; | 5214 | features &= ~NETIF_F_SG; |
5215 | } | 5215 | } |
5216 | 5216 | ||
5217 | /* TSO requires that SG is present as well. */ | 5217 | /* TSO requires that SG is present as well. */ |
5218 | if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { | 5218 | if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { |
5219 | netdev_info(dev, "Dropping TSO features since no SG feature.\n"); | 5219 | netdev_dbg(dev, "Dropping TSO features since no SG feature.\n"); |
5220 | features &= ~NETIF_F_ALL_TSO; | 5220 | features &= ~NETIF_F_ALL_TSO; |
5221 | } | 5221 | } |
5222 | 5222 | ||
@@ -5226,7 +5226,7 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5226 | 5226 | ||
5227 | /* Software GSO depends on SG. */ | 5227 | /* Software GSO depends on SG. */ |
5228 | if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { | 5228 | if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { |
5229 | netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); | 5229 | netdev_dbg(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); |
5230 | features &= ~NETIF_F_GSO; | 5230 | features &= ~NETIF_F_GSO; |
5231 | } | 5231 | } |
5232 | 5232 | ||
@@ -5236,13 +5236,13 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) | |||
5236 | if (!((features & NETIF_F_GEN_CSUM) || | 5236 | if (!((features & NETIF_F_GEN_CSUM) || |
5237 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) | 5237 | (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) |
5238 | == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { | 5238 | == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { |
5239 | netdev_info(dev, | 5239 | netdev_dbg(dev, |
5240 | "Dropping NETIF_F_UFO since no checksum offload features.\n"); | 5240 | "Dropping NETIF_F_UFO since no checksum offload features.\n"); |
5241 | features &= ~NETIF_F_UFO; | 5241 | features &= ~NETIF_F_UFO; |
5242 | } | 5242 | } |
5243 | 5243 | ||
5244 | if (!(features & NETIF_F_SG)) { | 5244 | if (!(features & NETIF_F_SG)) { |
5245 | netdev_info(dev, | 5245 | netdev_dbg(dev, |
5246 | "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); | 5246 | "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); |
5247 | features &= ~NETIF_F_UFO; | 5247 | features &= ~NETIF_F_UFO; |
5248 | } | 5248 | } |
@@ -5270,7 +5270,7 @@ int __netdev_update_features(struct net_device *dev) | |||
5270 | if (dev->features == features) | 5270 | if (dev->features == features) |
5271 | return 0; | 5271 | return 0; |
5272 | 5272 | ||
5273 | netdev_info(dev, "Features changed: 0x%08x -> 0x%08x\n", | 5273 | netdev_dbg(dev, "Features changed: 0x%08x -> 0x%08x\n", |
5274 | dev->features, features); | 5274 | dev->features, features); |
5275 | 5275 | ||
5276 | if (dev->netdev_ops->ndo_set_features) | 5276 | if (dev->netdev_ops->ndo_set_features) |
@@ -5462,12 +5462,6 @@ int register_netdevice(struct net_device *dev) | |||
5462 | dev->features |= NETIF_F_SOFT_FEATURES; | 5462 | dev->features |= NETIF_F_SOFT_FEATURES; |
5463 | dev->wanted_features = dev->features & dev->hw_features; | 5463 | dev->wanted_features = dev->features & dev->hw_features; |
5464 | 5464 | ||
5465 | /* Avoid warning from netdev_fix_features() for GSO without SG */ | ||
5466 | if (!(dev->wanted_features & NETIF_F_SG)) { | ||
5467 | dev->wanted_features &= ~NETIF_F_GSO; | ||
5468 | dev->features &= ~NETIF_F_GSO; | ||
5469 | } | ||
5470 | |||
5471 | /* Turn on no cache copy if HW is doing checksum */ | 5465 | /* Turn on no cache copy if HW is doing checksum */ |
5472 | dev->hw_features |= NETIF_F_NOCACHE_COPY; | 5466 | dev->hw_features |= NETIF_F_NOCACHE_COPY; |
5473 | if ((dev->features & NETIF_F_ALL_CSUM) && | 5467 | if ((dev->features & NETIF_F_ALL_CSUM) && |