Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3327308imu; Sun, 11 Nov 2018 12:27:33 -0800 (PST) X-Google-Smtp-Source: AJdET5dmrmoUeKvS7w7KSQOBJr9jl1+LjxWAhBpHZA1hZJLJszgazwt8vXPT8xpXfkgxc0wD8zGz X-Received: by 2002:a17:902:3225:: with SMTP id y34-v6mr16894781plb.227.1541968053391; Sun, 11 Nov 2018 12:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968053; cv=none; d=google.com; s=arc-20160816; b=XrJ8XdtCrmf/eJpoDg95Z4gpQDDx/TTOb+QhHkVVSb/C4Jr3UxijNEKXXugmhT4gw3 q4lTc2tFSPpZ3N5ap5Y/nDcMs2WkOEzlPKJ3i5NBYBfVLVkARs/PdVKi0OAJzteJRDWB 8Ae2GXQjfjr1p9LfjVvN+8ZvcU5hQkq+3Im7kpxGef9jpH1HSpeOo9T3oqIxGIHveQnL qYsfmzetbklEq1eCYA5XGLG8ZzNPjHGpHcxWC2MlJYeehVRZqMe/n/iIEeijWTM+hbt1 yLadVbS/o7l93bslem5bElNbZlLfDjUogY56yxxYvL7Zv3xR0nwCoWMtEon0WRYEHmE+ SCJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=Tuhwb8unUSAZbERkWY8gHRuB6Gk/SLpWk4hncl60z6E=; b=vyzeyTxHxqGxRv8Gc1YmxaQOSzq4j3jHYlP1USJ2Zrzy6nxvQkzk1hCrjD6lms0vlZ Jw8winmeeYP4KemmPp+g6YKae+xTkOwYlNkdT1So/hjchr0YMRG+kT+aDRmK3w97MA/D 9rAvto37kJwgilT0MVsXDkUxd0Nl6nn0TTVAy9tQR4LDgvSIoyfGd7vUUbw65PmFaTPF hPmzBBwGFe6AYj1Ng8EmEtY2JpbnVtR3YJUObLC3y8LMrWOR1c54IHQfTajdSgawFf9D SxozXrVdJOjKK8CrAGbDOQbXGbuse6kJYW4OEwJMly5TK7ZNkUMy2UplEjBZT1lsFDfh RTaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 z126-v6si16380687pfb.280.2018.11.11.12.27.18; Sun, 11 Nov 2018 12:27:33 -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; 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 S1731201AbeKLGPS (ORCPT + 99 others); Mon, 12 Nov 2018 01:15:18 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50910 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730638AbeKLFs2 (ORCPT ); Mon, 12 Nov 2018 00:48:28 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsl-0000l9-SL; Sun, 11 Nov 2018 19:58:56 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsY-0001m1-1n; Sun, 11 Nov 2018 19:58:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "David S. Miller" , "Tariq Toukan" , "Jack Morgenstein" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 287/366] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Jack Morgenstein commit 958c696f5a7274d9447a458ad7aa70719b29a50a upstream. Function mlx4_RST2INIT_QP_wrapper saved the qp number passed in the qp context, rather than the one passed in the input modifier. However, the qp number in the qp context is not defined as a required parameter by the FW. Therefore, drivers may choose to not specify the qp number in the qp context for the reset-to-init transition. Thus, we must save the qp number passed in the command input modifier -- which is always present. (This saved qp number is used as the input modifier for command 2RST_QP when a slave's qp's are destroyed). Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -2673,7 +2673,7 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4 u32 srqn = qp_get_srqn(qpc) & 0xffffff; int use_srq = (qp_get_srqn(qpc) >> 24) & 1; struct res_srq *srq; - int local_qpn = be32_to_cpu(qpc->local_qpn) & 0xffffff; + int local_qpn = vhcr->in_modifier & 0xffffff; err = qp_res_start_move_to(dev, slave, qpn, RES_QP_HW, &qp, 0); if (err)