Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7204283rwl; Fri, 30 Dec 2022 05:15:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsn+i4utau6DFoY0NxfmLjiXfFrqYXJR9Sq6i+hQLJO5uD8oMu6QbByZuMHI7AqAyXiab97 X-Received: by 2002:aa7:dd13:0:b0:47b:a6e:6b69 with SMTP id i19-20020aa7dd13000000b0047b0a6e6b69mr29745478edv.2.1672406134911; Fri, 30 Dec 2022 05:15:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672406134; cv=none; d=google.com; s=arc-20160816; b=LRJkVhq+X4hrUQmWuT39u5MRCmZAA8luj2ax6jTZx7aqZAZofZp/WnnOlUWOvyLoxK ++vBe4xhqV5Ym/d95L4B9Z4+ASWGWXPycOQfzH/NfTXTIc6yG01x0Wj7mfRyJ1YNCNE/ nRpiTliEI1ZRhq6kPxgPFsjdAnyL7Zjoz5ZODs438/aAGn2ZLZlg0rfLzLfVNQe/AI2U oRrKyBZH10GKEwDxT8n5H/izv8e8S6s6ZpdETe9hwJBi6zb9WKqhg7aGd5M5KqXhmaeQ /VFfIX58q/MJM8hWAwUVAmMksMbQ2HXGtm4JoQ+S1LeduOJ0gxFjGbncxLsoN36Ewfrd wocQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rfeRotrp1Ll7p/3+WkiKddMs1C2KJcYE/vOG7XZHhQs=; b=ug1/iGzQwsDNmh8+B05vvVr1Yd9r4JYfvok6lCzszT/lKm0Qn1wIZrSdZBYOps2gMJ TAg4nyH8PsagB8HBZPK+RfA8boN+kj7n9HGME5e+VgE4pGjEvccwhpbAf/W1y0xntprN uw9utknswZ6mUy7FVyvfZQmueIUdwfRx/zSdKwMNZ/gyo/RrHr19wr6Mq4qYQp/ixuxI FHvPOXq5+MsL8IyK2yb/Tz8kAel+sgwv8SDDZd8GC6HuwJxIWfJt68WLVn8twC94M32d GgdrNo3XkS2K7qsi+IqE9zL+RUc1UFJek/HqINS9XPNj9a1M4agLjVxzaGuyc4DYNId+ 0FNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=T668s895; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq12-20020a056402220c00b00478ab006e1dsi15861184edb.124.2022.12.30.05.14.59; Fri, 30 Dec 2022 05:15:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=T668s895; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234348AbiL3M4s (ORCPT + 63 others); Fri, 30 Dec 2022 07:56:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbiL3M4q (ORCPT ); Fri, 30 Dec 2022 07:56:46 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F8DC1AA36; Fri, 30 Dec 2022 04:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rfeRotrp1Ll7p/3+WkiKddMs1C2KJcYE/vOG7XZHhQs=; b=T668s895y4nf0A36CJRhoHbwo6 0sRkHu7gBU71tqtlbz+mMibrY03UypFmOHISF5gftk2uy8GRGZS2S/8Lf81HAivxHGHjSJKS/kHt+ suefMSGQqkp0s99Aqf4ib9Nrb4HffXUgEoHaT5G3MfQ5RddzCyWSC2h63XZnMOL24GNQ=; Received: from p200300daa720fc00fd7bb9014adaf597.dip0.t-ipconnect.de ([2003:da:a720:fc00:fd7b:b901:4ada:f597] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pBEvw-00Chzj-Pz; Fri, 30 Dec 2022 13:56:24 +0100 Message-ID: <82821d48-9259-9508-cc80-fc07f4d3ba14@nbd.name> Date: Fri, 30 Dec 2022 13:56:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Aw: [PATCH net v3 4/5] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging Content-Language: en-US To: Frank Wunderlich Cc: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , Russell King , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221230073145.53386-1-nbd@nbd.name> <20221230073145.53386-4-nbd@nbd.name> From: Felix Fietkau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30.12.22 12:46, Frank Wunderlich wrote: > Hi, > > v2 or v3 seems to break vlan on mt7986 over eth0 (mt7531 switch). v1 was working on next from end of November. But my rebased tree with v1 on 6.2-rc1 has same issue, so something after next 2711 was added which break vlan over mt7531. > > Directly over eth1 it works (was not working before). > > if i made no mistake there is still something wrong. > > btw. mt7622/r64 can also use second gmac (over vlan aware bridge with aux-port of switch to wan-port) it is only not default in mainline. But maybe this should not be used as decision for dropping "dsa-tag" (wrongly vlan-tag). > > regards Frank Thanks for reporting. Please try this patch on top of the series: --- --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3218,10 +3218,8 @@ static int mtk_open(struct net_device *dev) phylink_start(mac->phylink); netif_tx_start_all_queues(dev); - if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) - return 0; - - if (mtk_uses_dsa(dev) && !eth->prog) { + if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2) && + mtk_uses_dsa(dev) && !eth->prog) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { struct metadata_dst *md_dst = eth->dsa_meta[i]; @@ -3244,10 +3242,6 @@ static int mtk_open(struct net_device *dev) val &= ~MTK_CDMP_STAG_EN; mtk_w32(eth, val, MTK_CDMP_IG_CTRL); - val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); - val &= ~MTK_CDMQ_STAG_EN; - mtk_w32(eth, val, MTK_CDMQ_IG_CTRL); - mtk_w32(eth, 0, MTK_CDMP_EG_CTRL); }