提交 a128f9d4 编写于 作者: L Leon Romanovsky 提交者: Saeed Mahameed

net/mlx5e: Fix scheduling of IPsec ASO query while in atomic

ASO query can be scheduled in atomic context as such it can't use usleep.
Use udelay as recommended in Documentation/timers/timers-howto.rst.

Fixes: 76e463f6 ("net/mlx5e: Overcome slow response for first IPsec ASO WQE")
Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: NSimon Horman <simon.horman@corigine.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 c75b9425
...@@ -606,7 +606,8 @@ int mlx5e_ipsec_aso_query(struct mlx5e_ipsec_sa_entry *sa_entry, ...@@ -606,7 +606,8 @@ int mlx5e_ipsec_aso_query(struct mlx5e_ipsec_sa_entry *sa_entry,
do { do {
ret = mlx5_aso_poll_cq(aso->aso, false); ret = mlx5_aso_poll_cq(aso->aso, false);
if (ret) if (ret)
usleep_range(2, 10); /* We are in atomic context */
udelay(10);
} while (ret && time_is_after_jiffies(expires)); } while (ret && time_is_after_jiffies(expires));
spin_unlock_bh(&aso->lock); spin_unlock_bh(&aso->lock);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册