From patchwork Wed Jan 13 12:45:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles DOFFE X-Patchwork-Id: 362641 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 148AFC433DB for ; Wed, 13 Jan 2021 12:56:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9D29233F6 for ; Wed, 13 Jan 2021 12:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727218AbhAMMzv (ORCPT ); Wed, 13 Jan 2021 07:55:51 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:39112 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbhAMMzu (ORCPT ); Wed, 13 Jan 2021 07:55:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 52CB19C0DD1; Wed, 13 Jan 2021 07:45:40 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NpDf8A8lalEm; Wed, 13 Jan 2021 07:45:40 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id EBFBC9C0DCD; Wed, 13 Jan 2021 07:45:39 -0500 (EST) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AltUp2Rc3SPk; Wed, 13 Jan 2021 07:45:39 -0500 (EST) Received: from gdo-desktop.home (pop.92-184-98-96.mobile.abo.orange.fr [92.184.98.96]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id EFEAD9C0DCC; Wed, 13 Jan 2021 07:45:37 -0500 (EST) From: Gilles DOFFE To: netdev@vger.kernel.org Cc: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH net 3/6] net: dsa: ksz: insert tag on ks8795 ingress packets Date: Wed, 13 Jan 2021 13:45:19 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If 802.1q VLAN tag is removed from egress traffic, ingress traffic should by logic be tagged. Signed-off-by: Gilles DOFFE --- drivers/net/dsa/microchip/ksz8795.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 4b060503b2e8..193f03ef9160 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -874,6 +874,7 @@ static void ksz8795_port_vlan_add(struct dsa_switch *ds, int port, } ksz_port_cfg(dev, port, P_TAG_CTRL, PORT_REMOVE_TAG, untagged); + ksz_port_cfg(dev, port, P_TAG_CTRL, PORT_INSERT_TAG, !untagged); } static int ksz8795_port_vlan_del(struct dsa_switch *ds, int port,