[patch 13/42] forcedeth: fix checksum flag

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Wednesday, September 3, 2008 - 10:25 am

2.6.26-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Ayaz Abdulla <aabdulla@nvidia.com>

commit edcfe5f7e307846e578fb88d69fa27051fded0ab upstream

Fix the checksum feature advertised in device flags.  The hardware support
TCP/UDP over IPv4 and TCP/UDP over IPv6 (without IPv6 extension headers).
However, the kernel feature flags do not distinguish IPv6 with/without
extension headers.

Therefore, the driver needs to use NETIF_F_IP_CSUM instead of
NETIF_F_HW_CSUM since the latter includes all IPv6 packets.

A future patch can be created to check for extension headers and perform
software checksum calculation.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/forcedeth.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5420,7 +5420,7 @@ static int __devinit nv_probe(struct pci
 	if (id->driver_data & DEV_HAS_CHECKSUM) {
 		np->rx_csum = 1;
 		np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
-		dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
+		dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
 		dev->features |= NETIF_F_TSO;
 	}
 
@@ -5728,7 +5728,7 @@ static int __devinit nv_probe(struct pci
 
 	dev_printk(KERN_INFO, &pci_dev->dev, "%s%s%s%s%s%s%s%s%s%sdesc-v%u\n",
 		   dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
-		   dev->features & (NETIF_F_HW_CSUM | NETIF_F_SG) ?
+		   dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
 		   	"csum " : "",
 		   dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ?
 		   	"vlan " : "",

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/42] 2.6.26-stable review, Greg KH, (Wed Sep 3, 10:24 am)
[patch 01/42] cramfs: fix named-pipe handling, Greg KH, (Wed Sep 3, 10:25 am)
[patch 03/42] eeepc-laptop: fix use after free, Greg KH, (Wed Sep 3, 10:25 am)
[patch 07/42] x86: work around MTRR mask setting, Greg KH, (Wed Sep 3, 10:25 am)
[patch 13/42] forcedeth: fix checksum flag, Greg KH, (Wed Sep 3, 10:25 am)
[patch 14/42] atl1: disable TSO by default, Greg KH, (Wed Sep 3, 10:25 am)
[patch 24/42] pkt_sched: Fix actions referencing, Greg KH, (Wed Sep 3, 10:26 am)
[patch 36/42] tg3: Fix firmware event timeouts, Greg KH, (Wed Sep 3, 10:26 am)
[patch 41/42] KVM: MMU: Fix torn shadow pte, Greg KH, (Wed Sep 3, 10:26 am)
Re: [patch 29/42] net: Unbreak userspace which includes li ..., Stefan Lippers-Hollmann, (Wed Sep 3, 12:16 pm)
Re: [patch 00/42] 2.6.26-stable review, Henrique de Moraes H ..., (Wed Sep 3, 7:39 pm)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Thu Sep 4, 5:21 am)
Re: [patch 00/42] 2.6.26-stable review, Milan Broz, (Thu Sep 4, 5:28 am)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Thu Sep 4, 6:58 am)
Re: [patch 00/42] 2.6.26-stable review, Pavel Machek, (Fri Sep 12, 7:22 am)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Fri Sep 12, 8:37 am)
Re: [patch 00/42] 2.6.26-stable review, Henrique de Moraes H ..., (Fri Sep 12, 12:46 pm)
Re: [patch 00/42] 2.6.26-stable review, Pavel Machek, (Sat Sep 13, 9:56 am)