Commit 6344244c authored by David S. Miller's avatar David S. Miller

Merge tag 'mlx5-fixes-2018-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
Mellanox, mlx5 fixes 2018-09-17

Sorry about the previous submission of this series which was mistakenly
marked for net-next, here I am resending with 'net' mark.

This series provides three fixes to mlx5 core and mlx5e netdevice
driver.

Please pull and let me know if there's any problem.

For -stable v4.16:
('net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ')
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 08e39982 8f92e35a
...@@ -206,7 +206,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent) ...@@ -206,7 +206,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent)
u8 own; u8 own;
do { do {
own = ent->lay->status_own; own = READ_ONCE(ent->lay->status_own);
if (!(own & CMD_OWNER_HW)) { if (!(own & CMD_OWNER_HW)) {
ent->ret = 0; ent->ret = 0;
return; return;
......
...@@ -183,12 +183,13 @@ static const struct tlsdev_ops mlx5e_tls_ops = { ...@@ -183,12 +183,13 @@ static const struct tlsdev_ops mlx5e_tls_ops = {
void mlx5e_tls_build_netdev(struct mlx5e_priv *priv) void mlx5e_tls_build_netdev(struct mlx5e_priv *priv)
{ {
u32 caps = mlx5_accel_tls_device_caps(priv->mdev);
struct net_device *netdev = priv->netdev; struct net_device *netdev = priv->netdev;
u32 caps;
if (!mlx5_accel_is_tls_device(priv->mdev)) if (!mlx5_accel_is_tls_device(priv->mdev))
return; return;
caps = mlx5_accel_tls_device_caps(priv->mdev);
if (caps & MLX5_ACCEL_TLS_TX) { if (caps & MLX5_ACCEL_TLS_TX) {
netdev->features |= NETIF_F_HW_TLS_TX; netdev->features |= NETIF_F_HW_TLS_TX;
netdev->hw_features |= NETIF_F_HW_TLS_TX; netdev->hw_features |= NETIF_F_HW_TLS_TX;
......
...@@ -509,7 +509,7 @@ static int mlx5_hairpin_modify_sq(struct mlx5_core_dev *peer_mdev, u32 sqn, ...@@ -509,7 +509,7 @@ static int mlx5_hairpin_modify_sq(struct mlx5_core_dev *peer_mdev, u32 sqn,
sqc = MLX5_ADDR_OF(modify_sq_in, in, ctx); sqc = MLX5_ADDR_OF(modify_sq_in, in, ctx);
if (next_state == MLX5_RQC_STATE_RDY) { if (next_state == MLX5_SQC_STATE_RDY) {
MLX5_SET(sqc, sqc, hairpin_peer_rq, peer_rq); MLX5_SET(sqc, sqc, hairpin_peer_rq, peer_rq);
MLX5_SET(sqc, sqc, hairpin_peer_vhca, peer_vhca); MLX5_SET(sqc, sqc, hairpin_peer_vhca, peer_vhca);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment