]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Implement workaround for eTSEC76 erratum
authorAnton Vorontsov <avorontsov@mvista.com>
Wed, 30 Jun 2010 06:39:13 +0000 (06:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jun 2010 18:35:42 +0000 (11:35 -0700)
commit18ddbc4d482f9f6ae5363ce878b4c7001839a796
treee0bbd8c70d6f88674d047f2c107772ef63998e9c
parente01631e4138323b5e2a7918cce4cd665eca0a44d
gianfar: Implement workaround for eTSEC76 erratum

MPC8313ECE says:

"For TOE=1 huge or jumbo frames, the data required to generate the
 checksum may exceed the 2500-byte threshold beyond which the controller
 constrains itself to one memory fetch every 256 eTSEC system clocks.

 This throttling threshold is supposed to trigger only when the
 controller has sufficient data to keep transmit active for the duration
 of the memory fetches. The state machine handling this threshold,
 however, fails to take large TOE frames into account. As a result,
 TOE=1 frames larger than 2500 bytes often see excess delays before start
 of transmission."

This patch implements the workaround as suggested by the errata
document, i.e.:

"Limit TOE=1 frames to less than 2500 bytes to avoid excess delays due to
 memory throttling.
 When using packets larger than 2700 bytes, it is recommended to turn TOE
 off."

To be sure, we limit the TOE frames to 2500 bytes, and do software
checksumming instead.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c
drivers/net/gianfar.h