Commit c1d10d18 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Change netdev_fix_features messages loglevel
  vmxnet3: Fix inconsistent LRO state after initialization
  sfc: Fix oops in register dump after mapping change
  IPVS: fix netns if reading ip_vs_* procfs entries
  bridge: fix forwarding of IPv6
parents 477de0de 6f404e44
...@@ -1937,6 +1937,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) ...@@ -1937,6 +1937,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf)
size = min_t(size_t, table->step, 16); size = min_t(size_t, table->step, 16);
if (table->offset >= efx->type->mem_map_size) {
/* No longer mapped; return dummy data */
memcpy(buf, "\xde\xc0\xad\xde", 4);
buf += table->rows * size;
continue;
}
for (i = 0; i < table->rows; i++) { for (i = 0; i < table->rows; i++) {
switch (table->step) { switch (table->step) {
case 4: /* 32-bit register or SRAM */ case 4: /* 32-bit register or SRAM */
......
...@@ -311,6 +311,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data) ...@@ -311,6 +311,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data)
/* toggle the LRO feature*/ /* toggle the LRO feature*/
netdev->features ^= NETIF_F_LRO; netdev->features ^= NETIF_F_LRO;
/* Update private LRO flag */
adapter->lro = lro_requested;
/* update harware LRO capability accordingly */ /* update harware LRO capability accordingly */
if (lro_requested) if (lro_requested)
adapter->shared->devRead.misc.uptFeatures |= adapter->shared->devRead.misc.uptFeatures |=
......
...@@ -5186,27 +5186,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) ...@@ -5186,27 +5186,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
/* Fix illegal checksum combinations */ /* Fix illegal checksum combinations */
if ((features & NETIF_F_HW_CSUM) && if ((features & NETIF_F_HW_CSUM) &&
(features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
netdev_info(dev, "mixed HW and IP checksum settings.\n"); netdev_warn(dev, "mixed HW and IP checksum settings.\n");
features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
} }
if ((features & NETIF_F_NO_CSUM) && if ((features & NETIF_F_NO_CSUM) &&
(features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
netdev_info(dev, "mixed no checksumming and other settings.\n"); netdev_warn(dev, "mixed no checksumming and other settings.\n");
features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM);
} }
/* Fix illegal SG+CSUM combinations. */ /* Fix illegal SG+CSUM combinations. */
if ((features & NETIF_F_SG) && if ((features & NETIF_F_SG) &&
!(features & NETIF_F_ALL_CSUM)) { !(features & NETIF_F_ALL_CSUM)) {
netdev_info(dev, netdev_dbg(dev,
"Dropping NETIF_F_SG since no checksum feature.\n"); "Dropping NETIF_F_SG since no checksum feature.\n");
features &= ~NETIF_F_SG; features &= ~NETIF_F_SG;
} }
/* TSO requires that SG is present as well. */ /* TSO requires that SG is present as well. */
if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
netdev_info(dev, "Dropping TSO features since no SG feature.\n"); netdev_dbg(dev, "Dropping TSO features since no SG feature.\n");
features &= ~NETIF_F_ALL_TSO; features &= ~NETIF_F_ALL_TSO;
} }
...@@ -5216,7 +5216,7 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) ...@@ -5216,7 +5216,7 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
/* Software GSO depends on SG. */ /* Software GSO depends on SG. */
if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); netdev_dbg(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
features &= ~NETIF_F_GSO; features &= ~NETIF_F_GSO;
} }
...@@ -5226,13 +5226,13 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) ...@@ -5226,13 +5226,13 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
if (!((features & NETIF_F_GEN_CSUM) || if (!((features & NETIF_F_GEN_CSUM) ||
(features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
== (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
netdev_info(dev, netdev_dbg(dev,
"Dropping NETIF_F_UFO since no checksum offload features.\n"); "Dropping NETIF_F_UFO since no checksum offload features.\n");
features &= ~NETIF_F_UFO; features &= ~NETIF_F_UFO;
} }
if (!(features & NETIF_F_SG)) { if (!(features & NETIF_F_SG)) {
netdev_info(dev, netdev_dbg(dev,
"Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n");
features &= ~NETIF_F_UFO; features &= ~NETIF_F_UFO;
} }
...@@ -5414,12 +5414,6 @@ int register_netdevice(struct net_device *dev) ...@@ -5414,12 +5414,6 @@ int register_netdevice(struct net_device *dev)
dev->features |= NETIF_F_SOFT_FEATURES; dev->features |= NETIF_F_SOFT_FEATURES;
dev->wanted_features = dev->features & dev->hw_features; dev->wanted_features = dev->features & dev->hw_features;
/* Avoid warning from netdev_fix_features() for GSO without SG */
if (!(dev->wanted_features & NETIF_F_SG)) {
dev->wanted_features &= ~NETIF_F_GSO;
dev->features &= ~NETIF_F_GSO;
}
/* Enable GRO and NETIF_F_HIGHDMA for vlans by default, /* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
* vlan_dev_init() will do the dev->features check, so these features * vlan_dev_init() will do the dev->features check, so these features
* are enabled only if supported by underlying device. * are enabled only if supported by underlying device.
......
...@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = { ...@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = {
.open = ip_vs_app_open, .open = ip_vs_app_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
#endif #endif
......
...@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = { ...@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = {
.open = ip_vs_conn_open, .open = ip_vs_conn_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
static const char *ip_vs_origin_name(unsigned flags) static const char *ip_vs_origin_name(unsigned flags)
...@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = { ...@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = {
.open = ip_vs_conn_sync_open, .open = ip_vs_conn_sync_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
#endif #endif
......
...@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = { ...@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = {
.open = ip_vs_info_open, .open = ip_vs_info_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release_private, .release = seq_release_net,
}; };
#endif #endif
...@@ -2109,7 +2109,7 @@ static const struct file_operations ip_vs_stats_fops = { ...@@ -2109,7 +2109,7 @@ static const struct file_operations ip_vs_stats_fops = {
.open = ip_vs_stats_seq_open, .open = ip_vs_stats_seq_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release_net,
}; };
static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v) static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v)
...@@ -2178,7 +2178,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = { ...@@ -2178,7 +2178,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
.open = ip_vs_stats_percpu_seq_open, .open = ip_vs_stats_percpu_seq_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release_net,
}; };
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment