]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ
authorAlaa Hleihel <alaa@mellanox.com>
Mon, 3 Sep 2018 07:38:14 +0000 (10:38 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 17 Sep 2018 22:12:31 +0000 (15:12 -0700)
commitd1f7cafb25d48f750967c60dbce56e5fc3a46530
treea80ae335413cbe8ea821274bb4b34694d0b400f1
parent031283780692a7bd5d0e340bd77a786a866a47ee
net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ

When modifying hairpin SQ, instead of checking if the next state equals
to MLX5_SQC_STATE_RDY, we compare it against the MLX5_RQC_STATE_RDY enum
value.

The code worked since both of MLX5_RQC_STATE_RDY and MLX5_SQC_STATE_RDY
have the same value today.

This patch fixes this issue.

Fixes: 8e6569687774 ("net/mlx5: Hairpin pair core object setup")
Change-Id: I6758aa7b4bd137966ae28206b70648c5bc223b46
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/transobj.c