| From jejb@kernel.org Wed Sep 3 08:08:26 2008 |
| From: Ayaz Abdulla <aabdulla@nvidia.com> |
| Date: Thu, 28 Aug 2008 19:40:03 GMT |
| Subject: forcedeth: fix checksum flag |
| To: jejb@kernel.org, stable@kernel.org |
| Message-ID: <200808281940.m7SJe3SO029532@hera.kernel.org> |
| |
| 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 |
| @@ -5249,7 +5249,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; |
| } |
| |
| @@ -5548,7 +5548,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 " : "", |