Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp845863imu; Tue, 11 Dec 2018 08:26:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/XvI4a+3MSNCOBuBWeZjX02BPXMya4DGyZ2WXEI2jEANiiiUMGXJpw29Xf4HXpFxAKm4Hpm X-Received: by 2002:a17:902:2:: with SMTP id 2mr17072609pla.228.1544545577086; Tue, 11 Dec 2018 08:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545577; cv=none; d=google.com; s=arc-20160816; b=x7dYr1SaoG+21agNVHASKP14RLwKk7iUJvYxfRAVXZQ2akqqXnAtViofLYKQ+VgSHg tbO93Jq4fmcMhxxL8wX9Fo6ka64bdzUxdTrVqZQoLELhsUBcbQUQAw+no5WmHWkS9Gnk zRMxxLkjwbV9xTuz6sdNgeSVvjiYLaR8J0q+6/+m9/nlQrtZxxBbCXOTr8ai9CBmOzte Iia9JaCw34ENkaBhWTLu00pO+tYeFPGvgsgNFy5hrfO18Z4ekOAkFaSXy/lURwKP1Kls yHP4A9vyuVAOwSPcS+dLq5MeC4Hbl9fdEjE6tJz6DW5pM++qKBgFXi+qaR3mj+/qxfEX 0lww== 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=sn2IgIl4tTAt3AWq78u/GmjLtL2G8GBGdMyDr+4wEG4=; b=L2A9CWtlHR7pKVOqkH7DtFZxYx4sTqPFySSbj5P7VTJsho768mGj10+bLmAPXlOMOR o2DjOObR9rC+cyKKQR4RmYHYEfeJjSAe9Jb/WLWPl89UbX0iRuiBIDpSGfTDjSkl6eEV gGiKiinf3ZJcECikbe80xcBSgdryYByT+0hgkVTsoYGo6Q2XqZ5cSpxSBm5wIrkPjvlp G9mVOU/Qw6WMJPyuj9ILmjFP+0I9B1Z5QLtAT/0yf+dqcAB/ENhM7kYWqFOXmEL5pq43 eIkbZG5KeInLYAMoMTS5sEtM26qMmklLx9IrPmNYQHzt5gVdVCDHo/QjpiEsgofcetaM ZAMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iD7PnnW9; 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 h67si13839826pfb.146.2018.12.11.08.26.02; Tue, 11 Dec 2018 08:26:17 -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=iD7PnnW9; 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 S1728261AbeLKQXI (ORCPT + 99 others); Tue, 11 Dec 2018 11:23:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:60242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727586AbeLKPnl (ORCPT ); Tue, 11 Dec 2018 10:43:41 -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 E1FAB2087F; Tue, 11 Dec 2018 15:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543020; bh=9Ny32cH5Gx2+hBIkrxuRD3SlWk7SaCsev5lC8Kd9+ck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iD7PnnW9DNijeT2ZTbqq6J75wwe/syQrF/gJVH0ML7DX9DKkc39jytwVipx/Z5xOH YVbb0XzXsnFDr/Vj5j61GxzifzURgmSFXun4YNLkKgvf3Ee2jybk7G4dkiPLz6uERJ fHsiyI5Mvj4pwNZBBYPBwET101OwoHeV8dKU9724= 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 3.18 36/54] net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command Date: Tue, 11 Dec 2018 16:41:24 +0100 Message-Id: <20181211151548.105645780@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@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 3.18-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 b7cdef0aebd6..47c2f7c5703d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c @@ -372,6 +372,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