diff options
author | Mark Salter <msalter@redhat.com> | 1997-09-16 14:44:21 +0000 |
---|---|---|
committer | Mark Salter <msalter@redhat.com> | 1997-09-16 14:44:21 +0000 |
commit | 393457c0ddc6ce88f11fdf1b6012ee6642909786 (patch) | |
tree | aabb7696315fd069494b3e036cd579d4d67c7b49 /drivers | |
parent | 6c124b01fef359d767b7872232eccfd55f69b05c (diff) |
Fixed bus error by avoiding HPC bug affecting reads of dma registers.
Thanks for the docs, Ariel!
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sgiseeq.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index fe8153561..a580b21ef 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c @@ -1,4 +1,4 @@ -/* $Id: sgiseeq.c,v 1.1.1.1 1997/06/01 03:17:20 ralf Exp $ +/* $Id: sgiseeq.c,v 1.2 1997/08/20 18:18:52 shaver Exp $ * sgiseeq.c: Seeq8003 ethernet driver for SGI machines. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) @@ -380,18 +380,14 @@ static inline void sgiseeq_tx(struct device *dev, struct sgiseeq_private *sp, tx_maybe_reset_collisions(sp, sregs); - if(!(status & HPC3_ETXCTRL_ACTIVE)) { - if(!(status & SEEQ_TSTAT_PTRANS)) { - /* Oops, HPC detected some sort of error. */ - if(status & SEEQ_TSTAT_R16) - sp->stats.tx_aborted_errors++; - if(status & SEEQ_TSTAT_UFLOW) - sp->stats.tx_fifo_errors++; - if(status & SEEQ_TSTAT_LCLS) - sp->stats.collisions++; - } - kick_tx((struct sgiseeq_tx_desc *)KSEG1ADDR((hregs->tx_ndptr & ~0xf)), - hregs); + if(!(status & (HPC3_ETXCTRL_ACTIVE | SEEQ_TSTAT_PTRANS))) { + /* Oops, HPC detected some sort of error. */ + if(status & SEEQ_TSTAT_R16) + sp->stats.tx_aborted_errors++; + if(status & SEEQ_TSTAT_UFLOW) + sp->stats.tx_fifo_errors++; + if(status & SEEQ_TSTAT_LCLS) + sp->stats.collisions++; } /* Ack 'em... */ @@ -400,8 +396,13 @@ static inline void sgiseeq_tx(struct device *dev, struct sgiseeq_private *sp, if(!(td->tdma.cntinfo & (HPCDMA_XIU))) break; - if(!(td->tdma.cntinfo & (HPCDMA_ETXD))) + if(!(td->tdma.cntinfo & (HPCDMA_ETXD))) { + if(!(status & HPC3_ETXCTRL_ACTIVE)) { + hregs->tx_ndptr = PHYSADDR(td); + hregs->tx_ctrl = HPC3_ETXCTRL_ACTIVE; + } break; + } sp->stats.tx_packets++; sp->tx_old = NEXT_TX(sp->tx_old); td->tdma.cntinfo &= ~(HPCDMA_XIU | HPCDMA_XIE); |