Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2028001imu; Fri, 14 Dec 2018 04:44:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/UxPAsNZjw87XgVxg5EMbWDmbEVzxiPjS1NfL8lOxRE4Zf2to5ESRVYfz5XpHWIjQtjkucN X-Received: by 2002:a63:5d14:: with SMTP id r20mr2586706pgb.329.1544791499251; Fri, 14 Dec 2018 04:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791499; cv=none; d=google.com; s=arc-20160816; b=Q4eghxDwgbtxSIFZdwRIpW9o9h1gsKtSVV0/1RVC8wsy656q4/t+5CbGaUdyH8pdNQ Uy3TTfRDkzxdvG86NpXmUsCdC1oi2/yLsyc9C4saY3Er3woUZ5bR3Q6JyIjjPq2AVVV2 6nXLAt2LgPFKF3hUv2+8a91qCsyDyCf/EkohAMU3oGDTt2peADhYdcHDSSMcBu/5gDH7 qOr9EqqMn1dGRDNHu4e4LEXFE03RHJKpSyF0rcwpP+Cw6jXGYXV5yoWbRZZ4j8Rza7wh SFrdiydz8tscgRL2Ik3ugbyfqp+A7szNLRbLdC95++yA+AUCBJBtc4fph1CFOsYLDRZ3 vVGA== 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=ThXyP3ro96lshH2N2phuS7zxY24XCppCliy6yqh9oi4=; b=eNPIBFK/bUNau/afCJm2EICXOYMYxHaqVIicCCFqnMcb4WzA4Qmy2SsikwzYdRydxt 8Ekx3pEGI4SrAvtrEZdTxWG8V8itXdUXmP6Kmo1jjoiLTQJtPr4t/RJh3sy93sQn2cZC NfXzsgUaf+UYZ4ElYrq6uWGzQritkIXpq04qpm5Ej/G9RrgdfVGr4Q9Dy9zr+EZMG95V TBxP1YRfDouDNAXu3q+OrVQT5z2dYsnYNm06xlWaXzOJApzVJlBUFCqlRmOdYQ++kLPM a8GD9kjcRPNAPRz3fhUjkmj4g+W9biIGwHm1J5x+WnWKBjbXOjBeZxrWNXN0gFBZUKSt TlSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HfgIzlwh; 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 z31si4047832plb.402.2018.12.14.04.44.44; Fri, 14 Dec 2018 04:44:59 -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=HfgIzlwh; 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 S1730168AbeLNMn5 (ORCPT + 99 others); Fri, 14 Dec 2018 07:43:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:44492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729859AbeLNMBx (ORCPT ); Fri, 14 Dec 2018 07:01:53 -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 8717A2146F; Fri, 14 Dec 2018 12:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544788912; bh=aIdDxeuvznCR2cGjgn8dAewz3nLUeeYbteo7DWj0HrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HfgIzlwhqFVM2GAi8XhmWLN5vXBqgs/0lBGPTE0umoJJzqCuJaEsoniZl83FCtwQX hTIQ/vW3Va78AaXI17CnBHFMitrnuYN5t2H3E9sjwjB2FnI+6bjssp6AvRbL6+7BKP YaD1NBX1oNGPNntdvB3cfulJGUjudRHyppdZl3BU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tarick Bedeir , Eran Ben Elisha , "David S. Miller" Subject: [PATCH 4.19 006/142] net/mlx4_core: Correctly set PFC param if global pause is turned off. Date: Fri, 14 Dec 2018 12:58:11 +0100 Message-Id: <20181214115747.306854680@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tarick Bedeir [ Upstream commit bd5122cd1e0644d8bd8dd84517c932773e999766 ] rx_ppp and tx_ppp can be set between 0 and 255, so don't clamp to 1. Fixes: 6e8814ceb7e8 ("net/mlx4_en: Fix mixed PFC and Global pause user control requests") Signed-off-by: Tarick Bedeir Reviewed-by: Eran Ben Elisha Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1084,8 +1084,8 @@ static int mlx4_en_set_pauseparam(struct tx_pause = !!(pause->tx_pause); rx_pause = !!(pause->rx_pause); - rx_ppp = priv->prof->rx_ppp && !(tx_pause || rx_pause); - tx_ppp = priv->prof->tx_ppp && !(tx_pause || rx_pause); + rx_ppp = (tx_pause || rx_pause) ? 0 : priv->prof->rx_ppp; + tx_ppp = (tx_pause || rx_pause) ? 0 : priv->prof->tx_ppp; err = mlx4_SET_PORT_general(mdev->dev, priv->port, priv->rx_skb_size + ETH_FCS_LEN,