From: David S. Miller Date: Sun, 20 Feb 2011 03:17:35 +0000 (-0800) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=da935c66bacb3ed9ada984b053297f87c2dff63a;p=mv-sheeva.git Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/net/e1000e/netdev.c net/xfrm/xfrm_policy.c --- da935c66bacb3ed9ada984b053297f87c2dff63a diff --cc Documentation/feature-removal-schedule.txt index ccb6048415b,b3f35e5f9c9..057602d5555 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@@ -604,9 -604,18 +604,25 @@@ Who: Jean Delvare +Files: net/netfilter/xt_connlimit.c + +---------------------------- ++ + What: noswapaccount kernel command line parameter + When: 2.6.40 + Why: The original implementation of memsw feature enabled by + CONFIG_CGROUP_MEM_RES_CTLR_SWAP could be disabled by the noswapaccount + kernel parameter (introduced in 2.6.29-rc1). Later on, this decision + turned out to be not ideal because we cannot have the feature compiled + in and disabled by default and let only interested to enable it + (e.g. general distribution kernels might need it). Therefore we have + added swapaccount[=0|1] parameter (introduced in 2.6.37) which provides + the both possibilities. If we remove noswapaccount we will have + less command line parameters with the same functionality and we + can also cleanup the parameter handling a bit (). + Who: Michal Hocko + + ---------------------------- diff --cc drivers/net/e1000e/netdev.c index 7cedfeb505b,3fa110ddb04..ec0b803c501 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@@ -3335,8 -3344,21 +3341,23 @@@ int e1000e_up(struct e1000_adapter *ada return 0; } + static void e1000e_flush_descriptors(struct e1000_adapter *adapter) + { + struct e1000_hw *hw = &adapter->hw; + + if (!(adapter->flags2 & FLAG2_DMA_BURST)) + return; + + /* flush pending descriptor writebacks to memory */ + ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); + ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD); + + /* execute the writes immediately */ + e1e_flush(); + } + +static void e1000e_update_stats(struct e1000_adapter *adapter); + void e1000e_down(struct e1000_adapter *adapter) { struct net_device *netdev = adapter->netdev; @@@ -4154,7 -4179,11 +4186,10 @@@ static void e1000_watchdog_task(struct struct e1000_ring *tx_ring = adapter->tx_ring; struct e1000_hw *hw = &adapter->hw; u32 link, tctl; - int tx_pending = 0; + if (test_bit(__E1000_DOWN, &adapter->state)) + return; + link = e1000e_has_link(adapter); if ((netif_carrier_ok(netdev)) && link) { /* Cancel scheduled suspend requests. */ diff --cc net/core/dev.c index 4f6943928fe,8ae6631abcc..9d8bfd9d444 --- a/net/core/dev.c +++ b/net/core/dev.c @@@ -1284,10 -1284,12 +1285,12 @@@ static int __dev_close(struct net_devic LIST_HEAD(single); list_add(&dev->unreg_list, &single); - return __dev_close_many(&single); + retval = __dev_close_many(&single); + list_del(&single); + return retval; } -int dev_close_many(struct list_head *head) +static int dev_close_many(struct list_head *head) { struct net_device *dev, *tmp; LIST_HEAD(tmp_list); @@@ -5243,23 -5066,11 +5246,24 @@@ static void rollback_registered(struct list_add(&dev->unreg_list, &single); rollback_registered_many(&single); + list_del(&single); } -unsigned long netdev_fix_features(unsigned long features, const char *name) +u32 netdev_fix_features(struct net_device *dev, u32 features) { + /* Fix illegal checksum combinations */ + if ((features & NETIF_F_HW_CSUM) && + (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { + netdev_info(dev, "mixed HW and IP checksum settings.\n"); + features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); + } + + if ((features & NETIF_F_NO_CSUM) && + (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { + netdev_info(dev, "mixed no checksumming and other settings.\n"); + features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); + } + /* Fix illegal SG+CSUM combinations. */ if ((features & NETIF_F_SG) && !(features & NETIF_F_ALL_CSUM)) { diff --cc net/xfrm/xfrm_policy.c index 3f1257add4f,6459588befc..7a8e2c77d08 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@@ -1340,10 -1340,13 +1340,13 @@@ static inline struct xfrm_dst *xfrm_all default: BUG(); } - xdst = dst_alloc(dst_ops, 0) ?: ERR_PTR(-ENOBUFS); - xdst = dst_alloc(dst_ops); ++ xdst = dst_alloc(dst_ops, 0); xfrm_policy_put_afinfo(afinfo); - xdst->flo.ops = &xfrm_bundle_fc_ops; + if (likely(xdst)) + xdst->flo.ops = &xfrm_bundle_fc_ops; + else + xdst = ERR_PTR(-ENOBUFS); return xdst; }