bcmgenet_dump_tx_queue() is called from bcmgenet_timeout() in process or timer context and acquires ring->lock using spin_lock(). If a softirq such as TX NAPI (bcmgenet_tx_poll()) fires on the same CPU while the lock is held, it will deadlock trying to acquire ring->lock. Use spin_lock_bh() and spin_unlock_bh() in bcmgenet_dump_tx_queue(), matching bcmgenet_tx_reclaim(). Fixes: 13ea657806cf ("net: bcmgenet: improve TX timeout") Assisted-by: LLM Co-authored-by: Cursor Change-Id: I0c4c6392590b2d16abd44f75d3f6974f3e1b874b --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index ef155a170fa6..799da63e3a4e 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3508,14 +3508,14 @@ static void bcmgenet_dump_tx_queue(struct bcmgenet_tx_ring *ring) txq = netdev_get_tx_queue(priv->dev, ring->index); - spin_lock(&ring->lock); + spin_lock_bh(&ring->lock); intsts = ~bcmgenet_intrl2_1_readl(priv, INTRL2_CPU_MASK_STATUS); intmsk = 1 << ring->index; c_index = bcmgenet_tdma_ring_readl(priv, ring->index, TDMA_CONS_INDEX); p_index = bcmgenet_tdma_ring_readl(priv, ring->index, TDMA_PROD_INDEX); txq_stopped = netif_tx_queue_stopped(txq); free_bds = ring->free_bds; - spin_unlock(&ring->lock); + spin_unlock_bh(&ring->lock); netif_err(priv, tx_err, priv->dev, "Ring %d queue %d status summary\n" "TX queue status: %s, interrupts: %s\n" -- 2.34.1