Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5e: Use eq ptr from cq

Instead of looking for the EQ of the CQ, remove that redundant code and
use the eq pointer stored in the cq struct.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

+2 -12
+2 -12
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 3728 3728 static bool mlx5e_tx_timeout_eq_recover(struct net_device *dev, 3729 3729 struct mlx5e_txqsq *sq) 3730 3730 { 3731 - struct mlx5e_priv *priv = netdev_priv(dev); 3732 - struct mlx5_core_dev *mdev = priv->mdev; 3733 - int irqn_not_used, eqn; 3734 - struct mlx5_eq *eq; 3731 + struct mlx5_eq *eq = sq->cq.mcq.eq; 3735 3732 u32 eqe_count; 3736 3733 3737 - if (mlx5_vector2eqn(mdev, sq->cq.mcq.vector, &eqn, &irqn_not_used)) 3738 - return false; 3739 - 3740 - eq = mlx5_eqn2eq(mdev, eqn); 3741 - if (IS_ERR(eq)) 3742 - return false; 3743 - 3744 3734 netdev_err(dev, "EQ 0x%x: Cons = 0x%x, irqn = 0x%x\n", 3745 - eqn, eq->cons_index, eq->irqn); 3735 + eq->eqn, eq->cons_index, eq->irqn); 3746 3736 3747 3737 eqe_count = mlx5_eq_poll_irq_disabled(eq); 3748 3738 if (!eqe_count)