netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: davidm@davidmonro.net
Cc: netdev@vger.kernel.org, asun@darksunrising.com
Subject: Re: cassini driver and IPv6
Date: Wed, 21 May 2008 17:09:27 -0700 (PDT)	[thread overview]
Message-ID: <20080521.170927.54789076.davem@davemloft.net> (raw)
In-Reply-To: <47D4C552.5050704@davidmonro.net>

From: David Monro <davidm@davidmonro.net>
Date: Mon, 10 Mar 2008 15:51:22 +1030

> I've spent a while looking at the packet parser stuff but I have only a 
> vague idea what it is doing and am certainly not in a position to debug 
> it. My current solution is simply to only do the checksumming stuff at 
> the bottom of cas_rx_process_pkt if ntohs(skb->protocol) == 0x0800 (ie, 
> IPv4), else set skb->csum to CHECKSUM_NONE, which is kinda dirty. If 
> someone with a non-saturn cassini can confirm that they don't get hw 
> csum errors with ipv6, then I'd have to assume a saturn-only hardware 
> bug and could wrap it with (cp->cas_flags & CAS_FLAG_SATURN) as well.
> 
> Does this seem reasonable?

Sorry for letting this sit for so long.

It's better to get this working using your suggested workaround
for the time being, so I'll push the following fix upstream.

BTW, the cassini chips (as well as several other pices of
sun hardware) are fully documented at:

	http://wikis.sun.com/display/FOSSdocs

Thanks.

cassini: Only use chip checksum for ipv4 packets.

According to David Monro, at least with Natsemi Saturn chips the
cassini driver has some trouble with ipv6 checksums.

Until we have more information about what's going on here, only
use the chip checksums for ipv4.

This workaround was suggested and tested by David.

Update version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/cassini.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 93e1363..83768df 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -142,8 +142,8 @@
 
 #define DRV_MODULE_NAME		"cassini"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"1.5"
-#define DRV_MODULE_RELDATE	"4 Jan 2008"
+#define DRV_MODULE_VERSION	"1.6"
+#define DRV_MODULE_RELDATE	"21 May 2008"
 
 #define CAS_DEF_MSG_ENABLE	  \
 	(NETIF_MSG_DRV		| \
@@ -2136,9 +2136,12 @@ end_copy_pkt:
 		if (addr)
 			cas_page_unmap(addr);
 	}
-	skb->csum = csum_unfold(~csum);
-	skb->ip_summed = CHECKSUM_COMPLETE;
 	skb->protocol = eth_type_trans(skb, cp->dev);
+	if (skb->protocol == htons(ETH_P_IP)) {
+		skb->csum = csum_unfold(~csum);
+		skb->ip_summed = CHECKSUM_COMPLETE;
+	} else
+		skb->ip_summed = CHECKSUM_NONE;
 	return len;
 }
 
-- 
1.5.5.1.308.g1fbb5


      parent reply	other threads:[~2008-05-22  0:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4377F74A.8090707@davidmonro.net>
     [not found] ` <20051114.214848.83997631.davem@davemloft.net>
2008-03-10  5:21   ` cassini driver and IPv6 David Monro
2008-03-10  9:04     ` David Monro
2008-05-22  0:09     ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080521.170927.54789076.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=asun@darksunrising.com \
    --cc=davidm@davidmonro.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).