]> git.ipfire.org Git - people/arne_f/kernel.git/commit
CASSINI: Fix endianness bug.
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 11 Jan 2008 09:38:38 +0000 (01:38 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Feb 2008 19:43:44 +0000 (11:43 -0800)
commitdc92e7d27d392866bc4eba38b77e21ee31658b5c
tree19b81bce30efcf4d3f0d1ebcc491b5a2ebe00e57
parent6df2e34e938de2d7e6b192def65584d2e710ccc1
CASSINI: Fix endianness bug.

[ Upstream commit: e5e025401f6e926c1d9dc3f3f2813cf98a2d8708 ]

Here's proposed fix for RX checksum handling in cassini; it affects
little-endian working with half-duplex gigabit, but obviously needs
testing on big-endian too.

The problem is, we need to convert checksum to fixed-endian *before*
correcting for (unstripped) FCS.  On big-endian it won't matter
(conversion is no-op), on little-endian it will, but only if FCS is
not stripped by hardware; i.e. in half-duplex gigabit mode when
->crc_size is set.

cassini.c part is that fix, cassini.h one consists of trivial
endianness annotations.  With that applied the sucker is endian-clean,
according to sparse.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/cassini.c
drivers/net/cassini.h