Skip to content

Commit 6344244

Browse files
committed
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: David S. Miller <[email protected]>
2 parents 08e3998 + 8f92e35 commit 6344244

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent)
206206
u8 own;
207207

208208
do {
209-
own = ent->lay->status_own;
209+
own = READ_ONCE(ent->lay->status_own);
210210
if (!(own & CMD_OWNER_HW)) {
211211
ent->ret = 0;
212212
return;

drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,13 @@ static const struct tlsdev_ops mlx5e_tls_ops = {
183183

184184
void mlx5e_tls_build_netdev(struct mlx5e_priv *priv)
185185
{
186-
u32 caps = mlx5_accel_tls_device_caps(priv->mdev);
187186
struct net_device *netdev = priv->netdev;
187+
u32 caps;
188188

189189
if (!mlx5_accel_is_tls_device(priv->mdev))
190190
return;
191191

192+
caps = mlx5_accel_tls_device_caps(priv->mdev);
192193
if (caps & MLX5_ACCEL_TLS_TX) {
193194
netdev->features |= NETIF_F_HW_TLS_TX;
194195
netdev->hw_features |= NETIF_F_HW_TLS_TX;

drivers/net/ethernet/mellanox/mlx5/core/transobj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static int mlx5_hairpin_modify_sq(struct mlx5_core_dev *peer_mdev, u32 sqn,
509509

510510
sqc = MLX5_ADDR_OF(modify_sq_in, in, ctx);
511511

512-
if (next_state == MLX5_RQC_STATE_RDY) {
512+
if (next_state == MLX5_SQC_STATE_RDY) {
513513
MLX5_SET(sqc, sqc, hairpin_peer_rq, peer_rq);
514514
MLX5_SET(sqc, sqc, hairpin_peer_vhca, peer_vhca);
515515
}

0 commit comments

Comments
 (0)