Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp918220imu; Tue, 11 Dec 2018 09:32:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/URY/TcpKNx/dIGXTA+MKK1OHe37lZTHHX0JIDFa9WNUIlc9MPGgamxOxKB7ba+mwXKWkyS X-Received: by 2002:a62:444b:: with SMTP id r72mr17455288pfa.184.1544549534202; Tue, 11 Dec 2018 09:32:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544549534; cv=none; d=google.com; s=arc-20160816; b=LPrX9n7sfvu6l6wjZgKqIlpoR4CNaw4qCEAn7JL3D4xylRmkmtoSnK2Deqz7prz8eo hfSiMLLaFirJC3bGgJVUqYbe1tYMEa1RIzKg0C9lA+w3KFRC2L/f+EqJ1gaacEaNWX83 HhPWpM4yIU45N1YtiKfbHBSOj878xGywk0F9KLca7SgKE0afbqc8TWHmsg+TatNPWcZP ozWdsn/rf+RK8483y2RHXnU/T2krcIf0aVyekrN2sMVc//E1J7vY6fsuEwftqoTK/8e4 qvbewPT3rj8rPZxCT022wVY4CAC8RRsO5uBS119SQ1JiP/qr0N3/B5J9EX5zE7rNYDEU qiBQ== 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=+Z0N4JxHwhvrUMNCnkIRePFhHf3EWjaJCLDamnWvUt8=; b=iIr93ggp1OIptGqE3+8qKNz/8irJom0hEdtqvxpncb4wMZsBoVS70DD90Ry6hXlhgG 9fovdMRqtIPzyzp/69NMbuLMJ3iNnFeEgmWj+KdQ0T/mSO9xXg6aFm3EL87XVsIT/LJ0 pGYJY+3bfTT+NWRtYq3+dd8mGA9AkRvEIYq0PjypLZstqGr30BBPCtrtOI+AhLGhh3ih 1pt9ZT1FcbAeUVd4BdBmg4a7TRL69bZBBWTs3op3Oziy12a4MmmnOGj+TF2syhRu6VOT s2Ckn69VSKVhRG1Gd2jqHqzTdbsEqWnFLK+wECHLliyxI6kkNusVjucVkdi2QfYBDqvQ /KTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V9OoLMoF; 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 o184si11765701pgo.591.2018.12.11.09.31.59; Tue, 11 Dec 2018 09:32:14 -0800 (PST) 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=V9OoLMoF; 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 S1728510AbeLKPrQ (ORCPT + 99 others); Tue, 11 Dec 2018 10:47:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:35656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728499AbeLKPrN (ORCPT ); Tue, 11 Dec 2018 10:47:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 4954220989; Tue, 11 Dec 2018 15:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543232; bh=318JnzFMhGUWIUYtqYAXXFr1OykE+rcTdNvE+NDn7ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9OoLMoFQ/wy7D5WPOFTkcPlfntEIOKRVuTLYcbi6malTGnlTPjigLzIHyw6yJa3C b2Y06RmSAaI17pWlIYJLnujNSmkY+ddViLh1HirXLWIFWS+ouD54Sazmf9JeKKCAV9 CSjMnefhzqUdDQXjfrMqZp9XZqpIF7mexjY01U98= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jack Morgenstein , Tariq Toukan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 64/91] net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command Date: Tue, 11 Dec 2018 16:41:23 +0100 Message-Id: <20181211151611.367407186@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit bd85fbc2038a1bbe84990b23ff69b6fc81a32b2c ] When re-registering a user mr, the mpt information for the existing mr when running SRIOV is obtained via the QUERY_MPT fw command. The returned information includes the mpt's lkey. This retrieved mpt information is used to move the mpt back to hardware ownership in the rereg flow (via the SW2HW_MPT fw command when running SRIOV). The fw API spec states that for SW2HW_MPT, the lkey field must be zero. Any ConnectX-3 PF driver which checks for strict spec adherence will return failure for SW2HW_MPT if the lkey field is not zero (although the fw in practice ignores this field for SW2HW_MPT). Thus, in order to conform to the fw API spec, set the lkey field to zero before invoking SW2HW_MPT when running SRIOV. Fixes: e630664c8383 ("mlx4_core: Add helper functions to support MR re-registration") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx4/mr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index 93195191f45b..53833c06696f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c @@ -366,6 +366,7 @@ int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, container_of((void *)mpt_entry, struct mlx4_cmd_mailbox, buf); + (*mpt_entry)->lkey = 0; err = mlx4_SW2HW_MPT(dev, mailbox, key); } -- 2.19.1