diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-07-11 19:38:34 +0200 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-07-24 06:22:50 +0200 |
commit | 6b368f6859c80343e5d7c6e2a7c49df0a8a273c1 (patch) | |
tree | a94206bb0a36cdfb19e08907dcc4031b51e9348b /include/asm-h8300/param.h | |
parent | 8fa89bf5de066b11190ac804903021700c2b1185 (diff) |
mv643xx_eth: prevent breakage when link goes down during transmit
When the ethernet link goes down while mv643xx_eth is transmitting
data, transmit DMA can stop before all queued transmit descriptors
have been processed. But even the descriptors that _have_ been
processed might not be properly marked as done before the transmit
DMA unit shuts down.
Then when the link comes up again, the hardware transmit pointer
might have advanced while not all previous packet descriptors have
been marked as transmitted, causing software transmit reclaim to
hang waiting for the hardware to finish transmitting a descriptor
that it has already skipped.
This patch forcibly reclaims all packets on the transmit ring on a
link down interrupt, and then resyncs the hardware transmit pointer to
what the software's idea of the first free descriptor is. Also, we
need to prevent re-waking the transmit queue if we get a 'transmit
done' interrupt at the same time as a 'link down' interrupt, which
this patch does as well.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'include/asm-h8300/param.h')
0 files changed, 0 insertions, 0 deletions