Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: bse: drop `if_timer' logic
To:
Vitaliy Makkoveev <mvs@openbsd.org>
Cc:
tech@openbsd.org, kettenis@openbsd.org
Date:
Fri, 02 Jan 2026 18:06:53 +0100

Download raw body.

Thread
> Date: Fri, 2 Jan 2026 16:49:19 +0000
> From: Vitaliy Makkoveev <mvs@openbsd.org>
> 
> We don't set `if_watchdog' so any logic around `if_timer' is useless.

Maybe we should set if_watchdog?

> Index: sys/dev/ic/bcmgenet.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/bcmgenet.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 bcmgenet.c
> --- sys/dev/ic/bcmgenet.c	5 Nov 2024 18:58:59 -0000	1.8
> +++ sys/dev/ic/bcmgenet.c	2 Jan 2026 16:35:45 -0000
> @@ -656,7 +656,6 @@ genet_stop(struct genet_softc *sc)
>  
>  	ifp->if_flags &= ~IFF_RUNNING;
>  	ifq_clr_oactive(&ifp->if_snd);
> -	ifp->if_timer = 0;
>  
>  	intr_barrier(sc->sc_ih);
>  
> @@ -773,9 +772,6 @@ genet_txintr(struct genet_softc *sc, int
>  		--sc->sc_tx.queued;
>  	}
>  
> -	if (sc->sc_tx.queued == 0)
> -		ifp->if_timer = 0;
> -
>  	if (sc->sc_tx.cidx != cidx) {
>  		sc->sc_tx.next = i;
>  		sc->sc_tx.cidx = cidx;
> @@ -828,10 +824,8 @@ genet_start(struct ifnet *ifp)
>  		cnt++;
>  	}
>  
> -	if (cnt != 0) {
> +	if (cnt != 0)
>  		WR4(sc, GENET_TX_DMA_PROD_INDEX(qid), sc->sc_tx.pidx);
> -		ifp->if_timer = 5;
> -	}
>  }
>  
>  int
> 
>