Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3925020pxj; Mon, 21 Jun 2021 09:30:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmVgoi2rnLB7kmecpVX1NuqRGaeHh43dj39txxrMsZMuQnqYfR0QqXZYEEJVzhw6PTluqg X-Received: by 2002:a92:ac06:: with SMTP id r6mr18302219ilh.74.1624293000073; Mon, 21 Jun 2021 09:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293000; cv=none; d=google.com; s=arc-20160816; b=Xnm5/XGfZKnvVZpQUtmX7zdGfSpdZEyzUle9qRuLgGk92RdWam/kfKw6aCnraSU6QX /jcCwjN2XYYxW23okRoOhw0BaXzP6P7fOJkecdD5z/m9UVa+ti4yGRtxYgCcma8Q5TVz wPycVtcSNpTAjvCAuYc4S7OEb6YmwoztIewKuqTVWPlG4k7ijJqEowyAsMiiB4UqgBdn /u4A4p/qbyqlEklNEhC7E6KVC1iZfme6Uc6sMGrAO5NiqvcWsIZIzzV++Nl3SxeuqTB7 X1AFcLtf39NkuxCFNFz/T4r8T4cIU7wxxefcwTUxndRUmAS48kiN+ZUaWDQ5peGp+Odm o6Ug== 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=P81eS8fifKr0OVyHPk1Z86gw3osiJnSl4kbQstFM8Cw=; b=rrfdgT9bhNtberSMTnwF0YqRomlcbf1r3Mro6g8gJ4JYhG6/mDRDI0qBbshXj0tZQj CYXpRqN73DHXg+0BcwpgNU0QZ/Vwxbjm++F+avt4teldKiuyhbsjYnPZOcvqXdYXD1Dj crxP0O4DalGEgZ/nVua4Sw0EweYN5HyF6JtBs1J0enX+phsGQGpyZemfMzp11yDSq5KJ +d1vC+B1SJXP3YMIe+1DhDrNRzpqdIeXPqyUUE7gBpLrAYLyx87xey+2Qm3+dEARAShP Oskofp7PNGVHPGX0KHTDsp0uE98AIKwWJAc/4FidwTMvwaEHN0rmpUQGWyGIbQkBZBCk gUDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NLdt52Kd; 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 z10si13295724ilu.151.2021.06.21.09.29.47; Mon, 21 Jun 2021 09:30:00 -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=NLdt52Kd; 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 S231851AbhFUQaV (ORCPT + 99 others); Mon, 21 Jun 2021 12:30:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbhFUQ2Z (ORCPT ); Mon, 21 Jun 2021 12:28:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 59B6F611CE; Mon, 21 Jun 2021 16:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292608; bh=3yebqtSFo04ZF3moA16Tx2wVoONODRdt2MiuGFWWheY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NLdt52KdFpj6mYwJ/haCACkAj5JgIjTQe4XYjMPVmtD9eGiEJ4CSmA7il1YYV/R9G uGkeSpLh2+Lr9/KtUP4Ypl3u5dO27p1+fQeDyYP3sj0QX7GFgP1eOIjW1/iG97p9Rh WfQMOYiY2ASXrMU7iIA/YrqxeRbnTBAGZLAeMCLk= 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.10 063/146] net/mlx5: E-Switch, Allow setting GUID for host PF vport Date: Mon, 21 Jun 2021 18:14:53 +0200 Message-Id: <20210621154914.725600297@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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 bdafc85fd874..fc91bbf7d0c3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -464,8 +464,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