On Wed, Oct 10, 2018 at 3:35 PM NN <def...@posteo.de> wrote:

> I try to analyse my dmesg with:
>
>      # dmesg | grep ath0
>
> and I can see ERROR message:
>
>      > ath0 device timeout ...
>
> I have checked "ath.c" file in "/cvs/src/sys/dev/ic/" on stable branch.
>
> I found this one construction: "--sc->sc_tx_time == 0". Probably it's
> meen "0 == 0",


> I have made this patch (see in attachment) and now it's working without
> any ERROR/WARNING for me.
>
> Please confirm.
>
> If my FIX for "ath.c" is correct, please update cvs in new 6.4 Release.
>
...

> --- ath.c    31 Jan 2018 11:27:03 -0000    1.116
> +++ ath.c    11 Oct 2018 00:06:54 -0000
> @@ -930,7 +930,7 @@ ath_watchdog(struct ifnet *ifp)
>       if ((ifp->if_flags & IFF_RUNNING) == 0 || sc->sc_invalid)
>           return;
>       if (sc->sc_tx_timer) {
> -        if (--sc->sc_tx_timer == 0) {
> +        if (sc->sc_tx_timer == 0) {
>

This diff cannot be correct: the condition right above it is only true if
sc->sc_tx_timer is non-zero, so then testing whether it is _currently_ zero
will never be true.  That's also the only place sc->sc_tx_timer is
decremented, so deleting the '--' disables the timeout.  The existing code
decrements it and then tests whether it's zero, effectively testing whether
sc->sc_tx_timer was exactly 1.

Your work to update the driver in the thread from October 5th is a more
productive way to address the issues you're experiencing.


Philip Guenther

Reply via email to