diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2007-05-01 16:33:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 20:59:08 -0400 |
commit | d74472f0b2553e59eafb7feee0ff9558136a17e0 (patch) | |
tree | 38d85faf098e7c5b1e41dc23ea6c9044f8ae3e91 /drivers/net/sonic.c | |
parent | 8b6aaab8c8bdbe011aac79af218dd1e657984bab (diff) |
SONIC: small fix and cleanup
Fix a potential problem in the timeout handling: don't free the DMA buffers
before resetting the chip.
Also a trivial cleanup. Bring macsonic and jazzsonic into sync.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/sonic.c')
-rw-r--r-- | drivers/net/sonic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index c6320c719931..687c1413c4ee 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -178,8 +178,13 @@ static void sonic_tx_timeout(struct net_device *dev) | |||
178 | { | 178 | { |
179 | struct sonic_local *lp = netdev_priv(dev); | 179 | struct sonic_local *lp = netdev_priv(dev); |
180 | int i; | 180 | int i; |
181 | /* Stop the interrupts for this */ | 181 | /* |
182 | * put the Sonic into software-reset mode and | ||
183 | * disable all interrupts before releasing DMA buffers | ||
184 | */ | ||
182 | SONIC_WRITE(SONIC_IMR, 0); | 185 | SONIC_WRITE(SONIC_IMR, 0); |
186 | SONIC_WRITE(SONIC_ISR, 0x7fff); | ||
187 | SONIC_WRITE(SONIC_CMD, SONIC_CR_RST); | ||
183 | /* We could resend the original skbs. Easier to re-initialise. */ | 188 | /* We could resend the original skbs. Easier to re-initialise. */ |
184 | for (i = 0; i < SONIC_NUM_TDS; i++) { | 189 | for (i = 0; i < SONIC_NUM_TDS; i++) { |
185 | if(lp->tx_laddr[i]) { | 190 | if(lp->tx_laddr[i]) { |