Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp259999pxx; Wed, 28 Oct 2020 04:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNhnZcmuWfnEt8lTygCarDg5ohrcSbETS5o22iy/OM1cCy4aafXYEC6wJn5JehnZBn1pvO X-Received: by 2002:a17:906:7096:: with SMTP id b22mr7381705ejk.335.1603884086011; Wed, 28 Oct 2020 04:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884086; cv=none; d=google.com; s=arc-20160816; b=AcaeIGhymy83+J78oZa5dZzP/SQC2XpvissKfQgupJYEEBT/xxrQuYIKmKf63/mSVh 7+rV3cxsNUrMM+oqu8yb1WPX17TunwfgmRCBI1UOBO+yuqqMtLRq4YTJFrKudugVkKh+ LIkx9CTJnsCwOIReuf4iouAueNRSHSJndEGw6PZWuHdx7xfzz36v6wo68TE/9qXt5I6+ JJdxgSxzfrpYf2BrhkcLufEvdnpVW3Tpy64JogB8/z+1URTRA/37eWIzt1OSpNaIZ1Ik 27K+P8LmoBzWcEMuix4IpC6ikSj6fk/cO26FwwGRkR2Ctpoxbxv43qTFKrK/GSYEd3Bj 85PA== 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=dxzI1z0iy/zzS378yOOI3lHr+NqkcRV7tYATLj3Kyw4=; b=oTzzyPW/kF4jKui+rn86oWISN1pGmgIpkNzwS00W3b6SPIjgkBnPpuUv6CybPhIdur Kokwzkf5hKwXeBo+7dLwaE0I/9jJ8kt/fJkWtsmo67JQrmsRmnYU9SK+ZoDNqNDnO3w0 r2w0qfkMai+PrtBZo9ynSv/Wf8y4MXH4ByHToaQ4wPNXGY4jtuNv/5QdsdmFDNz6xXI7 6IDLVDk0ZnJH0ogc4d6Qab30eEnCW+8nNZnfNbv1e9eVrhv9FbLuS9v4a5dZ0qVoBNoJ bUXFrUNlGe5C1Rm8hvKa7jN97Evp50kL6RRLVnatSstfg6BAQTJ1PPT0tIn2E2RK4l88 99KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xT731kpR; 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 a42si3838927edf.535.2020.10.28.04.21.03; Wed, 28 Oct 2020 04:21:25 -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=xT731kpR; 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 S1789466AbgJ0PCU (ORCPT + 99 others); Tue, 27 Oct 2020 11:02:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:60790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1784552AbgJ0O7N (ORCPT ); Tue, 27 Oct 2020 10:59:13 -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 A9E9020714; Tue, 27 Oct 2020 14:59:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810753; bh=cq/XuqQTrvdr9EMhVUhZzusgJN+WzsKAYXLB+TUeYEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xT731kpRDCGzupWFcKC20bQahhz84TX7hDrsH+eR6SDMK5FzddQuoFWmEEZcqwu97 aFteLgeUECf/okSq4aq7cxsHJhsMMoP88hdqAbttuRu/DmWvas2SB5rsngrO+7R4BR y5MAibH0sRc54CLgr4xngvSZEOzeaGW5axiw2Q8c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , "David S. Miller" , Sasha Levin Subject: [PATCH 5.8 244/633] net: dsa: rtl8366: Skip PVID setting if not requested Date: Tue, 27 Oct 2020 14:49:47 +0100 Message-Id: <20201027135534.123339851@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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: Linus Walleij [ Upstream commit 3dfe8dde093a07e82fa472c0f8c29a7f6a2006a5 ] We go to lengths to determine whether the PVID should be set for this port or not, and then fail to take it into account. Fix this oversight. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/dsa/rtl8366.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index b941d45edd641..49c626a336803 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -436,6 +436,9 @@ void rtl8366_vlan_add(struct dsa_switch *ds, int port, "failed to set up VLAN %04x", vid); + if (!pvid) + continue; + ret = rtl8366_set_pvid(smi, port, vid); if (ret) dev_err(smi->dev, -- 2.25.1