From patchwork Tue Oct 27 13:49:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B176C55178 for ; Tue, 27 Oct 2020 14:59:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48F82222C8 for ; Tue, 27 Oct 2020 14:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810755; bh=cq/XuqQTrvdr9EMhVUhZzusgJN+WzsKAYXLB+TUeYEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=z3O3kG76K+EH/UWOuQxIT6kVdNGj/3KXqXqfiHADB72/1lYe0k7NO9Vafnu/uj0id 50biiNvZIOQ4geLv5pgotKa1Ec6Tz3E2x8gCxtZwHELuk234ADS2tVAxxFP8clEgV+ 0vKtWLPpuCpAI/GzOx1iGDlU3aT1rwjL60ZXm+wA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1784571AbgJ0O7O (ORCPT ); Tue, 27 Oct 2020 10:59:14 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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,