]> bbs.cooldavid.org Git - net-next-2.6.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)
commitd2757fc4076118e13180e91f02c3c52659be3d9d
tree2862b2b319d58cfa581d86855e80525d966aac6b
parenta977dbe8445b8a81d6127c4aa9112a2c29a1a008
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