Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3285393ybb; Tue, 31 Mar 2020 02:06:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs1TJaaN1d3S+8lhnmrUwS+YgNupG2VJQmNb05OxWqRWzjV+Ll/Cr4BIU2SZgPoACgY4BXN X-Received: by 2002:a4a:d595:: with SMTP id z21mr12744557oos.38.1585645573018; Tue, 31 Mar 2020 02:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645573; cv=none; d=google.com; s=arc-20160816; b=w4PG2+GBiZZLNhSVY6ZnM5KxKygI7wVGta1nWGVThe+F6mpak4yrEU79ohsXMTaTMj wXJ8h04HibxLzWBJs9HwPx7kVkFxsDWN6QmUKKVuJoFp3FleeH2BT4zBlQe68/bja3ZP 8yJ/6f+rDnUs/DViyJhbCKqVr4MHWIK05PTusA/MKWTNuOUg8XOV3kvAKQbzS98V3lqi ZkqsY/FCjfKOYKT9w0XzQWbPWNNHXITLVqY5te7E5WzDpm2c1+d4Td8pt0POtrxEcW3Q nyTh5335g+zYAfW9zdbCrWyVL5NrlDgQPZmQVgd3F0AoPe8IIfig9hbnmM1EsTOcNnGB IiTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/Su+HM2Q0jP5zRj2rbUHzHIxWPSQJqExpTucn2+kees=; b=xoPNAoifiQF34RF4d/WstDK/J+kq8U3/oN0S//N8+d9OyBsSfhq1+KtETfRTumzcdE MfnRj0A9XfxPEYywX2Uin0SRYJ4FWZc/yZ9Qh1M4aoqXUDWIwLxkwgrlXuhSgrjDVV4D lkqTVQBOV4EaovMGz2HR5qm/VsOZknIP1VzzwnDU7waezNH9Wg1voYUPfmVUhAU6t4lX LW6qIx4BcF5jls4xc5fudeUvhBI/AWacDrrZlHxnGnRjwUXepA0TNw7Tlg7ZW9vjFcvu cXIe0Lzh51FpaWuIMagFyM9fE9ZdHBfMw8Pb7ByyVLzzb5CZ4UkAOlFe1lrek9D+of8p aO0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Re/QmIzx"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k70si7090790oih.24.2020.03.31.02.06.01; Tue, 31 Mar 2020 02:06:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Re/QmIzx"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730652AbgCaJE1 (ORCPT + 99 others); Tue, 31 Mar 2020 05:04:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:44548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730403AbgCaJEY (ORCPT ); Tue, 31 Mar 2020 05:04:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D66D20675; Tue, 31 Mar 2020 09:04:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645464; bh=DPpZNpF3Vu+vM8Zu77MZehGo4UXKVkDd1qqj75mah7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Re/QmIzx1HW4DChMRJKDKwjs3ee59BdL+M2Xn/GmPCnOnkGrzFkJiNVLuazL5E418 ivGQ9J4fs/P+cgva4hhJQVmkDKbgLXP6J90880K89ZvNjeHswKRemdW1BSRuLdafZQ x7agaZ+wG5TQR5VZd7bnqTEr4oLSD12zTVMNytYM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , Saeed Mahameed , "David S. Miller" Subject: [PATCH 5.5 061/170] net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure Date: Tue, 31 Mar 2020 10:57:55 +0200 Message-Id: <20200331085431.001143650@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky [ Upstream commit 306f354c67397b3138300cde875c5cab45b857f7 ] The cap_mask1 isn't protected by field_select and not listed among RW fields, but it is required to be written to properly initialize ports in IB virtualization mode. Link: https://lore.kernel.org/linux-rdma/88bab94d2fd72f3145835b4518bc63dda587add6.camel@redhat.com Fixes: ab118da4c10a ("net/mlx5: Don't write read-only fields in MODIFY_HCA_VPORT_CONTEXT command") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -1071,6 +1071,9 @@ int mlx5_core_modify_hca_vport_context(s MLX5_SET64(hca_vport_context, ctx, port_guid, req->port_guid); if (req->field_select & MLX5_HCA_VPORT_SEL_NODE_GUID) MLX5_SET64(hca_vport_context, ctx, node_guid, req->node_guid); + MLX5_SET(hca_vport_context, ctx, cap_mask1, req->cap_mask1); + MLX5_SET(hca_vport_context, ctx, cap_mask1_field_select, + req->cap_mask1_perm); err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out)); ex: kfree(in);