[PATCH net-next v7 3/7] net: stmmac: refactor FPE verification process

Vladimir Oltean olteanv at gmail.com
Wed Sep 4 06:02:23 PDT 2024


On Wed, Sep 04, 2024 at 05:21:18PM +0800, Furong Xu wrote:
> +static void stmmac_fpe_verify_timer_arm(struct stmmac_fpe_cfg *fpe_cfg)
> +{
> +	struct ethtool_mm_state *state = &fpe_cfg->state;
> +
> +	if (state->pmac_enabled && state->tx_enabled &&
> +	    state->verify_enabled &&
> +	    state->verify_status != ETHTOOL_MM_VERIFY_STATUS_FAILED &&
> +	    state->verify_status != ETHTOOL_MM_VERIFY_STATUS_SUCCEEDED) {
> +		/* give caller a chance to release the spinlock */
> +		mod_timer(&fpe_cfg->verify_timer, jiffies + 1);
> +	}
> +}

Why do you need to give the caller a chance to release the spinlock?
Isn't the timer code blocked anyway, as stmmac_fpe_verify_timer_arm()
runs under irqsoff?



More information about the linux-arm-kernel mailing list