Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2021 10:08:37 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Andrei Martin <andrei.cos.martin@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: neta device generates kernel panic
Message-ID:  <X/nG9dey3fjMzJ/s@raichu>
In-Reply-To: <CAC%2BC28SiChXXy6kctHLhwHJLJx=ce9vhTiE3TUK-CCi-ktwtJw@mail.gmail.com>
References:  <CAC%2BC28SiChXXy6kctHLhwHJLJx=ce9vhTiE3TUK-CCi-ktwtJw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 09, 2021 at 04:07:50PM +0200, Andrei Martin wrote:
> Hello,
> 
> While trying to run the FreeBSD on EspressoBin (arm64) a kernel panic
> appeared in the neta device.
> The following function call[1] was the one generating this behaviour. It
> says that the SC mutex
> is not owned. My solution was to add the lock/unlock operations, as follows:
> *mvneta_sc_lock(sc);*
> *mvneta_clear_mib(sc);*
> *mvneta_sc_unlock(sc);*
> 
> *and it works fine.*

Hi Andrei,

Sorry for the breakage, after making some modifications to the patch I
only retested with GENERIC-NODEBUG.  I pushed a fix to main.

> 
> *Also, reading the patch[2], found that `mvneta_clear_mib` does some new
> operations (counter_pdfc = counter_pofc = counter_watchdog = 0) than just
> clearing MIB counter registers. I do not know if it was intended but it's
> worth mentioning.*

That was intentional.

> 
> [1]
> https://github.com/freebsd/freebsd-src/blob/main/sys/dev/neta/if_mvneta.c#L1193
> [2]
> https://github.com/freebsd/freebsd-src/commit/caf552a607191ffc798e3edb697ae99d5b15711a
> 
> Andrei
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?X/nG9dey3fjMzJ/s>