Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2217112imm; Thu, 7 Jun 2018 07:13:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLBpAGo52T0bwbk8ycR7swu+t95my517bxOlDVFjkBp+PHSvjRt+jRlEpcAYifQg60uuYuy X-Received: by 2002:a63:931c:: with SMTP id b28-v6mr1737366pge.167.1528380813357; Thu, 07 Jun 2018 07:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528380813; cv=none; d=google.com; s=arc-20160816; b=rpM2O/sbCSa5FYFofYWy/atfeyAc8e1YdrZ8RDY8trAaCw9p0dK1hFeX9B1cT6erl9 kyKqAUHI0mx0EoG0CeQxq3NWJsGS+Gl7yaFWr/vwp98Ol6h8V2rpPBl6zicj9wpS+4ax wdI9Gz0jC2gVaLCR0Wrc5HA6uriQ1j4CsoWr/ZEw/EQHuGySExZEwVm7GYXzOMMcYe5h Bx1i83kD/xwswAp7bleyiQNFoMT60t2HA6g5a52oLpJYu6bGdRRU6ii/Eeaja2v4yDvs y2O5XGkTFwGr0vjUA5W/YzjEajNf7FA3XG4udDC1IEDROP6+U+wDhIgNZhcuzxIQ+Oei 3EHA== 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 :arc-authentication-results; bh=Je2JE/VS02SLmRMMzaZzp1YjTpEks6W2/groaesWfr0=; b=ZAysA5ZJFqMi8pmzjeKdr1IZh5b3z9FkQQe+0g7YoBoeiDHWoYBHSep6snSwhrCH/y vI8tXSblUrORsYLe1MB+ARpAsl9J0o8J+HchRl91K/RuIbi9q/xohK1hKXHCv+fiIk53 wtWKEvWS2mdvBwTz3qnioJ0Fxi8f2agEH4EKizuNcOBROg562tp8G1OYTrwFdUPXAu28 4yJAiSdtnVlqIlqGu9rw1N8dkEYrMWYXdPxdITtCeSPH6lDq02SD9eav+CJ93axbcuyv a5S8eUgRStbkIr4eEZIY0KlRMl5Mz8NCeVHpE9H+ZhfB13HJWr0gXnrgAMPc6c2MiMU4 hXlQ== 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 r10-v6si40130660pgp.363.2018.06.07.07.13.19; Thu, 07 Jun 2018 07:13:33 -0700 (PDT) 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 S933313AbeFGOLz (ORCPT + 99 others); Thu, 7 Jun 2018 10:11:55 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39550 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933165AbeFGOJk (ORCPT ); Thu, 7 Jun 2018 10:09:40 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbI-0005hO-KV; Thu, 07 Jun 2018 15:09:16 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvbF-0003KC-IQ; Thu, 07 Jun 2018 15:09:13 +0100 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, "Ivan Vecera" , "David S. Miller" , "Amir Vadai" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 405/410] net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam() In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 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.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ivan Vecera commit 278d436a476f69fc95d5c82bf61b6c2d02f4d44e upstream. The driver does not support pause autonegotiation so it should return -EINVAL when the function is called with non-zero autoneg. Cc: Amir Vadai Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -476,6 +476,9 @@ static int mlx4_en_set_pauseparam(struct struct mlx4_en_dev *mdev = priv->mdev; int err; + if (pause->autoneg) + return -EINVAL; + priv->prof->tx_pause = pause->tx_pause != 0; priv->prof->rx_pause = pause->rx_pause != 0; err = mlx4_SET_PORT_general(mdev->dev, priv->port,