[CASSINI]: Fix endianness bug.
commite5e025401f6e926c1d9dc3f3f2813cf98a2d8708
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 4 Jan 2008 02:49:00 +0000 (3 18:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2008 08:47:04 +0000 (4 00:47 -0800)
tree0d682965be7d1582c49570f4199b5d4a9b8a1891
parent2d60abc2a937bf77575c3b8c83faeeb84a84e654
[CASSINI]: Fix endianness bug.

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>
drivers/net/cassini.c
drivers/net/cassini.h