forcedeth endianness bugs
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 9 Dec 2007 16:06:41 +0000 (16:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:07:13 +0000 (15:07 -0800)
commit5bb7ea26148369315492c3dfc43c3b6366a9f279
tree3250e30a8d7c3aec8bd4d49e63329bb9a7b8de7f
parent79ea13ce07c951bb4d95471e7300baa0f1be9e78
forcedeth endianness bugs

* misannotation: struct register_test members are actually host-endian
* bug: cpu_to_le64(n) >> 32 instead of cpu_to_le32(n >> 32) in setting
->bufhigh and similar for ->buflow (take low bits, _then_ convert to
little-endian, not the other way round).
* bug: setup_hw_rings() should not convert to little-endian at all (we
feed the result to writel(), not store in shared data structure), let
alone try to play with shifting and masking little-endian values.  Introduced
when setup_hw_rings() went in, screwed both 64bit case and the old code for
32bit rings it had replaced.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/forcedeth.c