tg3: 5701 DMA corruption fix
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 25 Apr 2008 08:46:46 +0000 (01:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 May 2008 21:44:31 +0000 (14:44 -0700)
commit9287ef4c9e3f3d0d9f412f910207b8b77a1e51eb
tree7169ad275c34ab9ccee5e09538fa00a0073cbe57
parenta889712794ce774eee7b4649136fecf3a8bf76ee
tg3: 5701 DMA corruption fix

[ Upstream commit: 41588ba1ae166eaba0a70abf2d7ff064ad9331d3 ]

Herbert Xu's commit fb93134dfc2a6e6fbedc7c270a31da03fce88db9, entitled
"[TCP]: Fix size calculation in sk_stream_alloc_pskb", has triggered a
bug in the 5701 where the 5701 DMA engine will corrupt outgoing
packets.  This problem only happens when the starting address of the
packet matches a certain range of offsets and only when the 5701 is
placed downstream of a particular Intel bridge.

This patch detects the problematic bridge and if present, readjusts the
starting address of the packet data to a dword aligned boundary.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/tg3.c
drivers/net/tg3.h