linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Gianfar TCP checksumming broken in 2.6.35+
@ 2010-11-02 22:29 Matthew L. Creech
  2010-11-18 17:06 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew L. Creech @ 2010-11-02 22:29 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: davem

Hi,

An upgrade from 2.6.34 to 2.6.35 caused networking to stop working on
my MPC8313-based board.  It turned out that TCP checksums were
invalid, so I dug through the .35 changelog to try and isolate the
reason.  The change "tcp: Set CHECKSUM_UNNECESSARY in
tcp_init_nondata_skb" seems to be the specific one that causes
breakage - if I revert this one-liner, things work again:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e8e18ef52e7dd1af0a3bd1f7d990a1d0b249586

However, I also noticed that one of my boards was broken while a newer
prototype (which is very similar, hardware-wise) was not.  It turns
out they're using 2 different revisions of silicon, so the broken
board still has a 1.0 version microcontroller.

Therefore I'm guessing (just a hunch) that the root cause of the
problem is MPC8313 errata eTSEC12:

========
eTSEC12: Tx IP and TCP/UDP Checksum Generation not supported for some Tx FCB
         offsets
Description:
	If the Tx FCB (Frame Control Block) 32-byte offset is 0x19, 0x1A, 0x1B,
	0x1C, 0x1D, 0x1E or 0x1F, IP and TCP/UDP header checksum generation do
	not function properly. The checksum value may be inserted in the wrong
	location or not inserted at all.
	IP and TCP/UDP header checksum generation is not supported in LINUX
	and other systems in which headers are prepended to pre-aligned packet
	data, or where the alignment of the Tx FCB cannot be controlled.
	This behavior applies to pseudo-header checksum insertion as well as
	checksum generation.
Workaround:
	Align Tx FCB to a 16 or 32-byte boundary.
	If the alignment of TxFCB is not controllable, set TCTRL[TUCSEN]=0 and
	TCTRL[IPCSEN]=0 to disable IP and TCP/UDP header checksum generation.
Fix plan:
	Fixed in Rev 2.0
========

This appears to have been working previously, but doesn't work any
more.  I'm not familiar enough with Dave's checksum/sk_buff changes to
figure out whether this errata is to blame, though, or how I should
fix it if it is.  Presumably there's some alignment magic needed in
the sk_buff or gfar_add_fcb() to make sure that the microcontroller is
happy with the FCB offset?

Any tip on how I can solve this, or at least verify that this errata
is at fault?  Thanks in advance

-- 
Matthew L. Creech

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Gianfar TCP checksumming broken in 2.6.35+
@ 2011-01-18  7:56 Alex Dubov
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Dubov @ 2011-01-18  7:56 UTC (permalink / raw)
  To: mlcreech; +Cc: linuxppc-dev, davem

It appears that I'm hitting an exactly the same problem with my MPC8548=0Ar=
ev2.0 (errata number eTSEC 49).=0A=0AConsidering that it's close to 3 month=
 now since this most unfortunate=0Abug was reported, was there any resoluti=
on/patch that can fix it for good?=0A=0A=0A=0A      

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-18  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 22:29 Gianfar TCP checksumming broken in 2.6.35+ Matthew L. Creech
2010-11-18 17:06 ` David Miller
2010-11-18 19:31   ` Matthew L. Creech
2010-11-18 19:34     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2011-01-18  7:56 Alex Dubov

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).