Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2011680imu; Fri, 14 Dec 2018 04:29:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjRZLhDfEhPuIpjPhJTIHh4HjSb/ZR4DFo0cIetCqqBcxSG/7yCtg6OuULjsN6AUzWddE1 X-Received: by 2002:a63:ee4c:: with SMTP id n12mr2477078pgk.21.1544790563651; Fri, 14 Dec 2018 04:29:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544790563; cv=none; d=google.com; s=arc-20160816; b=SHVeRyTlv/MyOcV5vDOFHJYkR5T3xm5PBtKH2E8DysRpCVy5viNpaaUqqfxIs8qBOS DVKwgdj5IAJgC3dLQ1cmWyxYguFuGg5UiGS9iDIb6LLaslPupX4NjjdPXMXKz09YPsD4 C8l91O9jO3uQcXFDPYjNwRmXZfREo7BJ9+a952oOxE91ZLRsgw0OXKSzMmJ9hLgIhReb qmFjI7aKFGpHsB6S7OmHkAmI4YveMGBJJdr/iYUa4YPd7NG4bhEUnSxR389Z0nj8jInR uJ1+BUSE1iUo6T0aL0M6YHhw2RenTwathhV5r2d7DvJINqTBn7syKa4AhFa5V0rOAxx5 vA/g== 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=xwa/2v5SNv4vlKn+1LRA9JEklEuEW3Q9b/GQRlkJzJw=; b=ZMqBCPG3sqjdOesUe5k0ewNafbzry9oMkA1w0sKm7JfKex/r2y1Cpoth7+QFQ44q3c yywmeABbiKOJkhO+Bu3KrSuWakIDn8cSbP/GKVzhEqkbkgSri72YPRXF4zDIWGzi5RMb HnsTO7TKcZJOmJa/eulePKqelefUtGEL+iAsCmBd52WfwsAQrR66SECaOXYrPIEkSNlj z7J5rPdT3JhtxPMHnwYvrhmeH2Rh4KnUCt2Zy+5BRBTWhAW1+QiSpEaYDOWKzMlfGPKZ oWibXbFMlpafqqFFpgl5pwuMMvQJYaTcH80MmcJCKN3bA66p4k0t/afnC23T/quCKHiJ Q44Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=19ouMxJh; 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 c191si4236373pfg.72.2018.12.14.04.29.09; Fri, 14 Dec 2018 04:29:23 -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=19ouMxJh; 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 S1731931AbeLNM1I (ORCPT + 99 others); Fri, 14 Dec 2018 07:27:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:58398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731808AbeLNMLi (ORCPT ); Fri, 14 Dec 2018 07:11:38 -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 4A8CA2133F; Fri, 14 Dec 2018 12:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789497; bh=EZcz0NR7MK8XpS8B2HY+XYNFDNosVjfNMtNEcKonAjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=19ouMxJhsHnJCOdyTWShvnE9fu62Th+qQYD9KH1HroeR3oT5W8kIgqoKYrJDNWM08 s4vTK8aDR59Pf5iPSuyE7YALPHvTXQUX+CASg1L4m5RivM2AmLZ5iJD3aa7sawb6gJ ZnonYcHYU9xnl/KQm+WlIV4AN24Ef+5R/tKKKFms= 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.9 04/51] net/mlx4_core: Correctly set PFC param if global pause is turned off. Date: Fri, 14 Dec 2018 13:00:06 +0100 Message-Id: <20181214115713.776063231@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115713.244259772@linuxfoundation.org> References: <20181214115713.244259772@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.9-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 @@ -1027,8 +1027,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,