]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Optimize rx double copy test
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 12 Apr 2010 06:58:27 +0000 (06:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Apr 2010 09:25:44 +0000 (02:25 -0700)
commitf1e2ec6a0698e7ca8f477b502c15f3c71f65ba2c
tree2862b2b319d58cfa581d86855e80525d966aac6b
parentdc1f59273ecbbfb2f7181e61ea5e7d63c4e354de
tg3: Optimize rx double copy test

On a PCIX bus, the 5701 has a bug which requires the driver to double
copy all rx packets.  The rx code uses the rx_offset device member as a
flag to determine if this workaround should take effect.  The following
patch will modify the rx_offset member such that this test will become
less clear.

The patch starts by integrating the workaround check into the packet
length check.  It rounds out the implementation by relaxing the
workaround restrictions if the platform has efficient unaligned
accesses.

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