NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-sparc64/46260: gem0 driver fails to recover after RX overflow

The following reply was made to PR port-sparc64/46260; it has been noted by 

From: Julian Coleman <>
Subject: Re: port-sparc64/46260: gem0 driver fails to recover after RX overflow
Date: Wed, 11 Apr 2012 19:56:00 +0100

 > Scratch that diff, here is one which works, but which ends up
 > resetting the interface Quite Often, despite the state register
 > indicating it's not in overflow mode -- it prints
 >   gem0: rx_watchdog: not in overflow state: 0x10400
 > Only once in my testing did I see
 >   gem0: rx_watchdog: rd pointer != saved
 > occur, but it *did* occur.
 I think that this approach (watchdog) is the way to go.  A few comments:
 > +                    aprint_error_dev(sc->sc_dev,
 > +                        "receive error: RX no buffer space\n");
 I wonder if we should print out these extra diagnostics (we don't do it
 in other drivers).  I think that we would be better off by updating extra
 counters, and using them as per the suggestions in "Using event counters
 with network interfaces, is there a reason they're all ifdefed out of
 mainline use?" thread, starting at:
 I think that the reason that you're seeing the extra resets is the difference
 between checking GEM_MAC_RX_OVERFLOW in gem_intr():
 >              if (rxstat & GEM_MAC_RX_OVERFLOW) {
 >                      ifp->if_ierrors++;
 > +                    aprint_error_dev(sc->sc_dev,
 > +                        "receive error: RX overflow\n");
 >                      gem_reset_rxdma(sc);
 but checking GEM_MAC_STATE_OVERFLOW in gem_rx_watchdog():
 .  However, I'm not sure if we should be checking GEM_MAC_STATE_OVERFLOW and
 GEM_MAC_RX_OVERFLOW in gem_intr().  Maybe we can check GEM_MAC_STATE_OVERFLOW
 if GEM_MAC_RX_OVERFLOW is set and fire the callout only then.  Alternatively,
 we might only need to check GEM_MAC_STATE_OVERFLOW (and not bother with
   My other computer also runs NetBSD    /        Sailing at Newbiggin        /

Home | Main Index | Thread Index | Old Index