Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp316404pxk; Fri, 11 Sep 2020 07:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp1KNZz0TFJC/jP8bvUQPgMLvx5i2iUyseH+PMGBVVvwtIxGoOYFwStCDS7N6RTx+3z+fY X-Received: by 2002:a50:cdd1:: with SMTP id h17mr2408597edj.94.1599835436477; Fri, 11 Sep 2020 07:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599835436; cv=none; d=google.com; s=arc-20160816; b=n75cJJHiAPr2iOKuL9+yl8FuQctrGVJYNbcjCeS1xPr9RgAxQhcqhbh97FzUrx4Z5v iuHGPAjNskVLpGJxMjpxUAis6Vp1XYU2Fs4mOmDqTm+zwGJUr3AFrg0MBC5FoGVMr8Tv Gg1O3CT2Se68x0Cztv2HbbfRz+iZKYqgyvIzVrPkKycrpdDs3Pl1S3T+VEDqiL9tH8Ka Iyg6lSZrEIxzlfWMjLVU5VPJwQcSE70kEyRBt9A2WF30MY0JwzVulaGzV9UH4irEz/a0 62KZSePrXvIeeceCdIApNayOM0Wb7yEZn6Eq3VdY1DVVwx4Fm/Gtx30siZnkJazwL4q8 kaPg== 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=U3cpzhKAYHb9erLBsK55mLnB7aIHXqaJ40DCs5YnuRc=; b=v9EoVPbYOhrKe6j1kyk2xVDqbWrgFQHSCTQss6mVSr98LfEo6Hw/A1IUimycK1NESC OyW50eCU/jzoH7qt30+75/yb/5IxduN6Fb3f2k8LymOTN9dB3BSJSmNv4LhRT7Fiy8l4 er7XVmQwpr7v7+VAjz8c8HhkQgcgVPIGtfMOrsCsLRHYWzN63vRio1TmfWpYkzrvh5l2 w7htIhuC+8OWSwyVLH7QQ1IUFXrtsLS6vCRvqDUvaz3cmzdjy1nwMtDMoNQLURQaVsbt +3gaCE6er6WRgw6RRtx3mQypiJCLbtTn5ij93J9fY+YNazzqcAVdd1JbHTQBHv6xXBy+ WqgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2vbhglol; 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=fail (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 y22si1119009ejc.738.2020.09.11.07.43.31; Fri, 11 Sep 2020 07:43:56 -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=@kernel.org header.s=default header.b=2vbhglol; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726236AbgIKOjL (ORCPT + 99 others); Fri, 11 Sep 2020 10:39:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:57612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbgIKNMA (ORCPT ); Fri, 11 Sep 2020 09:12:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 AAD7322475; Fri, 11 Sep 2020 13:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829254; bh=4Huu70dJ+HjD8QlR9LohnstfTGmLMG6oxi13lowcang=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2vbhglolyzEBItOTzJAT4/vUIkm3izDju9qkvsUxArYblkNzGpkKL/mXAeEIXAp5V aD7cMe/H7Auj05wcFyAXl2yqN4pJm3+OjEGRW8pEMLbcHkBG1bmmxbRElv76u0YMTs r8BVagdextxHYfNWja/Z2zIO9wlrCmwbxwYy9EHg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roi Dayan , Saeed Mahameed Subject: [PATCH 4.19 8/8] net/mlx5e: Dont support phys switch id if not in switchdev mode Date: Fri, 11 Sep 2020 14:54:55 +0200 Message-Id: <20200911125422.103702175@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911125421.695645838@linuxfoundation.org> References: <20200911125421.695645838@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Roi Dayan Support for phys switch id ndo added for representors and if we do not have representors there is no need to support it. Since each port return different switch id supporting this block support for creating bond over PFs and attaching to bridge in legacy mode. This bug doesn't exist upstream as the code got refactored and the netdev api is totally different. Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -198,7 +198,7 @@ int mlx5e_attr_get(struct net_device *de struct mlx5_eswitch_rep *rep = rpriv->rep; struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; - if (esw->mode == SRIOV_NONE) + if (esw->mode != SRIOV_OFFLOADS) return -EOPNOTSUPP; switch (attr->id) {