Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3936853pxj; Mon, 21 Jun 2021 09:44:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkzbrVoLR8+OrWkdTpARIGU4+cliwKwSfnWaI22H9H6TJJK+TKGEO0l8FY1v076mpACi3Z X-Received: by 2002:a17:906:248d:: with SMTP id e13mr8912457ejb.270.1624293899381; Mon, 21 Jun 2021 09:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293899; cv=none; d=google.com; s=arc-20160816; b=Kohympj63fU28y3ffMeoONGI85EscEbZdiu5xqZTeB9BuuuGk4FzoEdVv5YeqbWt+I hVm152n93E2ZCEO4bY/WmQ2zLAkdZC7CgWjXTpQh2py4wmRA1imHQzQUcEw/dx1BNlE4 fwnNI19BqkMKTmrM6yxpNdLIfZhzpZcen1qLpq9x/yAoN/4VZEH6lrjhNslNTS12aKl9 UtKQE/71lyCdjHMSI+rWVDToQGrPtbSQdTrs+KmUVcFmi66aG1r8W3b3yk2koAj7G99h 1qwGOTIY6MCzYYzb5gP+8LFk2yB3X9J2kIzlHeuZtK9khVNn4n0B043rjmuAvJJOeGTY yc6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W1JrZ+zunONc2JkgItOfDcBKOOdoalZ0+TVqn5Nk4Ds=; b=OTfGUZvMlax2VcGWfbl8xC+CQxMnYLAj+WhhNmsO4Skvc192YjBBf8CUm6H0Pn6ONS dEmfKhLP8tctQNiTKAcG+63YbqIN4fWMw0M+oj4yhidhYn4Y5Sw2D1UmfNOT5Ail+/5t KsI7Y8JmZmxD8S17qvdFrTllDHK+mn0xzsIOuMW3t/sxy7LsSlhe9j4pnOykWloiuw0H IqsPjP5b1mcHeTYaPyT7I+Yy6GGtM1skNXi299aQzG+d4jgxB8hoKbUHeqH+ldfAnDe0 4RiJ9dK6xrFVSvU7SIIwLVn3+9tRthG6fGGIiWjwiMZxBBvLOM5e9Qk96PEa88P5781n NggQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ivc8HFBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 29si3179524ejh.414.2021.06.21.09.44.36; Mon, 21 Jun 2021 09:44:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ivc8HFBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbhFUQog (ORCPT + 99 others); Mon, 21 Jun 2021 12:44:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:33850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232184AbhFUQkn (ORCPT ); Mon, 21 Jun 2021 12:40:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 33AE46143A; Mon, 21 Jun 2021 16:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293032; bh=wKz/0iTWWHAsjuAjahBhrthe1+NdzQLESIzkV5eyCH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ivc8HFBcuteOlMOBMKOCwcnQRZvhdIHLQ35vbIYHNqxN7hpvpFeq9lwET6t4XNo0K 3Pu2D5s5hJ04g+lRbs7J0wuHGQpFnomqU2pHbzveZg8GnNYLLQNu61gICeLWFA3cBG EkLCw5EsDGeOoH2DHsujclANazVXCM7mKEJgK690= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yuval Avnery , Parav Pandit , Bodong Wang , Alaa Hleihel , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.12 074/178] net/mlx5: E-Switch, Allow setting GUID for host PF vport Date: Mon, 21 Jun 2021 18:14:48 +0200 Message-Id: <20210621154925.087792951@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Parav Pandit [ Upstream commit ca36fc4d77b35b8d142cf1ed0eae5ec2e071dc3c ] E-switch should be able to set the GUID of host PF vport. Currently it returns an error. This results in below error when user attempts to configure MAC address of the PF of an external controller. $ devlink port function set pci/0000:03:00.0/196608 \ hw_addr 00:00:00:11:22:33 mlx5_core 0000:03:00.0: mlx5_esw_set_vport_mac_locked:1876:(pid 6715):\ "Failed to set vport 0 node guid, err = -22. RDMA_CM will not function properly for this VF." Check for zero vport is no longer needed. Fixes: 330077d14de1 ("net/mlx5: E-switch, Supporting setting devlink port function mac address") Signed-off-by: Yuval Avnery Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Reviewed-by: Alaa Hleihel Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index e05c5c0f3ae1..7d21fbb9192f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -465,8 +465,6 @@ int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev, void *in; int err; - if (!vport) - return -EINVAL; if (!MLX5_CAP_GEN(mdev, vport_group_manager)) return -EACCES; -- 2.30.2