• E
    net/mlx5e: Move all TX timeout logic to be under state lock · bfc647d5
    Eran Ben Elisha 提交于
    Driver callback for handling TX timeout should access some internal
    resources (SQ, CQ) in order to decide if the tx timeout work should be
    scheduled.  These resources might be unavailable if channels are closed
    in parallel (ifdown for example).
    
    The state lock is the mechanism to protect from such races.
    Move all TX timeout logic to be in the work under a state lock.
    
    In addition, Move the work from the global WQ to mlx5e WQ to make sure
    this work is flushed when device is detached..
    
    Also, move the mlx5e_tx_timeout_work code to be next to the TX timeout
    NDO for better code locality.
    
    Fixes: 3947ca18 ("net/mlx5e: Implement ndo_tx_timeout callback")
    Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
    bfc647d5
en_main.c 114.9 KB