[Cbe-oss-dev] [Bug 8279] PS3: ipv6 causes ethernet hang

Olaf Kirch olaf.kirch at ORACLE.COM
Sat Apr 14 03:45:56 EST 2007


Hi,

I came across bug #8279 in bugzila.kernel.org. Here's a patch for it - it's against
git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux-patches.git. Hope
this is the right tree.

Olaf
----------------
Summary: Use NETIF_F_IP_CSUM in gelic driver
From: Olaf Kirch <olaf.kirch at oracle.com>

The gelic driver currently adds NETIF_F_HW_CSUM to its features bitfield,
which signals to the network stack that it is capable of doing any kind
of HW assisted checksumming on TX. The current implementation however
only supports checksums for TCP or UDP over IPv4. Sending TCPv6 will
cause TX timeouts (see http://bugzilla.kernel.org/show_bug.cgi?id=8279)

This patch replaces NETIF_F_HW_CSUM with NETIF_F_IP_CSUM, which is
the appropriate flag for this.

Signed-off-by: olaf.kirch at oracle.com
---
 drivers/net/gelic_net.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: ps3/drivers/net/gelic_net.c
===================================================================
--- ps3.orig/drivers/net/gelic_net.c
+++ ps3/drivers/net/gelic_net.c
@@ -1503,16 +1503,16 @@ gelic_net_nway_reset(struct net_device *
 static uint32_t
 gelic_net_get_tx_csum(struct net_device *netdev)
 {
-	return (netdev->features & NETIF_F_HW_CSUM) != 0;
+	return (netdev->features & NETIF_F_IP_CSUM) != 0;
 }
 
 static int
 gelic_net_set_tx_csum(struct net_device *netdev, uint32_t data)
 {
 	if (data)
-		netdev->features |= NETIF_F_HW_CSUM;
+		netdev->features |= NETIF_F_IP_CSUM;
 	else
-		netdev->features &= ~NETIF_F_HW_CSUM;
+		netdev->features &= ~NETIF_F_IP_CSUM;
 
 	return 0;
 }
@@ -1691,7 +1691,7 @@ gelic_net_setup_netdev(struct gelic_net_
 
 	gelic_net_setup_netdev_ops(netdev);
 
-	netdev->features = NETIF_F_HW_CSUM;
+	netdev->features = NETIF_F_IP_CSUM;
 
 	status = lv1_net_control(card->dev->did.bus_id, card->dev->did.dev_id,
 				GELIC_NET_GET_MAC_ADDRESS,


-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax



More information about the cbe-oss-dev mailing list