The stats update needs to protect against being interrupted by a tasklet
The u64 stats seqlock needs to be initialized
Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
if (netif_running(dev) && netif_device_present(dev)) {
- if (spin_trylock(&hwstats->stats_lock)) {
+ if (spin_trylock_bh(&hwstats->stats_lock)) {
fe_stats_update(priv);
- spin_unlock(&hwstats->stats_lock);
+ spin_unlock_bh(&hwstats->stats_lock);
}
}
priv->tx_ring.tx_ring_size = NUM_DMA_DESC;
priv->rx_ring.rx_ring_size = NUM_DMA_DESC;
INIT_WORK(&priv->pending_work, fe_pending_work);
+ u64_stats_init(&priv->hw_stats->syncp);
napi_weight = 16;
if (priv->flags & FE_FLAG_NAPI_WEIGHT) {