Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1497912ybl; Thu, 22 Aug 2019 15:53:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZmUYQ5uAmF8TYwt3FU60bfnl0lDsD2LdjGqNwQVaEtmqtoFiXcPOCfbexM7+Ag6PRKe5W X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr1287180plp.126.1566514437327; Thu, 22 Aug 2019 15:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566514437; cv=none; d=google.com; s=arc-20160816; b=OTVtlU2pTzB4/Fe5pXS2fj7DNF/Hzgsyz2mCuw5XFc7U8NNrnyK8g9GmJQKWFj/PEo U9SUtq1HsripiD1VPVzcq42jbzyh/CtViqmXGjgZJLVDBlOsrNQ74952U4If//pCc//t id1o1IzZhKxV1u5irUv9F595bY11YPPpMa9N4iTypAeLlXkj5kv+AdH86QriA65jL4DK DwAtHDFkAFxScEkeoP8H8RWILac0sjQws2qTBtIjchpfawc26Y1V5w5t8OjiKHT76M+x 9+omIBdoz/A12fqgxcjYoPu6jhRHTXEU1qenxvhjOoqQPL+biYxi01Fa4VPEiIYxFzbV IFtA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8eb5T4W7v4dV+kttkenHJwn065olbu//4fZTckVAyVw=; b=suaemsIDCdk8XoJjRpl++MHe32d0kj7GfYMYVupWB0zH8LxtbDnwbKbz36LMrfoo40 6d2t4+4VkLtdAM877QdDQogx9CPdvhdfvsBiXcYo46hk6R2i4PscWgtT+RvvvKZhGqXM 5LuvFrjKJT9YGb39yn99N3dA+Ug0pLVVJivF2IOuJV2KnP+2yvventEUHhfA/nF38yXa 8ICY9OflAVDUCuPyKQpnWujpF9Ywn+QMDtNk0rg8Vi3So0KScIab3CsyoNt9ghx/t0Gq 9p9nThM/0DMgAa1zngyKz4U1phfb9GSdj4M5u4K8KC2cUHb2do164EsykUnDRGv6uNR1 OUmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f0x5Oo10; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 98si730190plb.345.2019.08.22.15.53.40; Thu, 22 Aug 2019 15:53:57 -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; dkim=pass header.i=@kernel.org header.s=default header.b=f0x5Oo10; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389078AbfHVRK4 (ORCPT + 99 others); Thu, 22 Aug 2019 13:10:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:59670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390725AbfHVRJT (ORCPT ); Thu, 22 Aug 2019 13:09:19 -0400 Received: from sasha-vm.mshome.net (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D742C2342C; Thu, 22 Aug 2019 17:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493758; bh=LNHX7SHIryIqbQUTuokVV2rHRG1ianQMIAGYYVkHNKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0x5Oo10XdPqgwNl81c4mSZgJowgKbLrGCXWH4snWWqdKWhRWsesjmCNL5HbHFHsO Z5F9T/04/Hkvg7pSXP/6pufGTxZW3J+MetAOzV0nn4UHOMgODN7FqTIamy9HMjOClG AyeWoiS0NdHJoHofsDffsia6rQ6kppNMrmGVqEks= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Huy Nguyen , Parav Pandit , Saeed Mahameed , Greg Kroah-Hartman Subject: [PATCH 5.2 118/135] net/mlx5e: Only support tx/rx pause setting for port owner Date: Thu, 22 Aug 2019 13:07:54 -0400 Message-Id: <20190822170811.13303-119-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190822170811.13303-1-sashal@kernel.org> References: <20190822170811.13303-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.2.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.2.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.2.10-rc1 X-KernelTest-Deadline: 2019-08-24T17:07+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huy Nguyen [ Upstream commit 466df6eb4a9e813b3cfc674363316450c57a89c5 ] Only support changing tx/rx pause frame setting if the net device is the vport group manager. Fixes: 3c2d18ef22df ("net/mlx5e: Support ethtool get/set_pauseparam") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index f637d81f08bcb..22d5101769651 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -1317,6 +1317,9 @@ int mlx5e_ethtool_set_pauseparam(struct mlx5e_priv *priv, struct mlx5_core_dev *mdev = priv->mdev; int err; + if (!MLX5_CAP_GEN(mdev, vport_group_manager)) + return -EOPNOTSUPP; + if (pauseparam->autoneg) return -EINVAL; -- 2.20.1