Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2720510rdb; Tue, 12 Sep 2023 10:01:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPBfh6vJpOrqoclPN56ICm36k49pqt20NqBCg97nJV5U9DM6UjmaD2REFkQO29YNH/1sK+ X-Received: by 2002:a05:6a20:3d20:b0:154:bfaf:a710 with SMTP id y32-20020a056a203d2000b00154bfafa710mr9971852pzi.41.1694538104689; Tue, 12 Sep 2023 10:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694538104; cv=none; d=google.com; s=arc-20160816; b=OkaMmlLP+TbmK/YPtaFGTqWX0wDJ4UJmwJWV6/mqxs5cJ6JuN0qd7Y4l33a1rBX4F4 x3YtKjnzHE4MDI5Ek6I/Wggm2+AHElJ5hmtmbA7pDlS0dJl9Mzxz4z6MUvPFM+lMPgxx GpwBEHFYA9Rb/hAKSsGxUrjfetQ+lKpFu/h2+R8qIsceEJMhZZwdP4hn8sIRL4/ctN8L 0CQq37ZWvEqQqbkL5Cs8fIe/deBIFFNijMNPXsJtL+wagWfTY6WLyut3fqI6y72jHG9i IdcXu0oHZSIKlC21iDstb9wd++rH1A4/9IhmdtzpbvaD1JnSOqEE//aJ/rJblLPPup0P /EEw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Dn4TgEzrAdz2bdBKKMJZsRroR4da2heG9+A1fboRUrw=; fh=7pT+hAKdFm8SgkIrQfctQAWhXj//sVAB1OFY1O6ncNU=; b=ORoyrFjip+iGGAG3ztchS7M6kXxXOIfhJoGERhKvS/Xd6sRyGbqaO/9svYr1UVhPpe AGUcs3JXmCQ4o/GmtdJ1mbLlz2tzjPRhTtMiur/zRXMsGb4jtYvEi16ceO6H8yZEuPLn 5Ia2A6M7FqMfRj9cJj4yx8ftqIJIAo4MXJzSx6Z/TyaSYkMYVBFAvgTstizirC3wZhX3 +TVDsKS1K/fXQEx5NpWtXLQ1WvHARhdUxBvMqVn2mUdZelWvJ8UbDgiOomrtCfbIN1R8 Lg0gWQ+KfPf4XdY5kxjb/jqDp4a7LKfmTphKnXdVZpaxBl4drpc6AR37EyTAz9pV6ZZF OKYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=rLjDZBYu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p20-20020a639514000000b0055c1760dd8esi8298013pgd.380.2023.09.12.10.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 10:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=rLjDZBYu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B70818114D2A; Tue, 12 Sep 2023 05:26:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235125AbjILM0D (ORCPT + 99 others); Tue, 12 Sep 2023 08:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbjILMZq (ORCPT ); Tue, 12 Sep 2023 08:25:46 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19661704; Tue, 12 Sep 2023 05:25:42 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-502934c88b7so8912803e87.2; Tue, 12 Sep 2023 05:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694521540; x=1695126340; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Dn4TgEzrAdz2bdBKKMJZsRroR4da2heG9+A1fboRUrw=; b=rLjDZBYu0W1MbcafUORHEn7Y6UywGWGr6LzUnhkgncSWABK19cE4TCsaISwIpswARZ b8SRpWmHQaseRbzpN2Pediqa3iMdV56ZSrT0GAG2gMqjW3yFnPqmIE7WuGmZA1sZjfqu vSQl5xB3XyMnNTqfH2qmC7Qb3Gf40U8YU+Eed0SJPuvVC+WXH7a1dgLo0nAVnwjz9D5j ra8o8EDQAK53gX1aeZQJoxnnvC8J33HXlt0lp1Lt1c3uDegiaP0yt+Kde/o6jDCiVpP9 3puPqhX9vmxOZMXAmVF7cbr+a21XvEsp6xpP0DTVRduP7pP+dvDIwIXgHz2UJOA1CRsb YmTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694521540; x=1695126340; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dn4TgEzrAdz2bdBKKMJZsRroR4da2heG9+A1fboRUrw=; b=i7Tsdf+Y+m777qe9WhrKwPmvELB9saYwlWov/JAbHThoCwG7eYovvR1gBIkcyVk9Mz BfRvENReOB3X9O0jtbpIqK14pj0rUIbbrfa0krviFjIn6LdHlkJpGkMF+s7lyYOTGq3+ 9CsqrFCBi7y9GOxK+f6fR909UiyevFpLLG4Q34ufbqbL+nEqwKxlYUyLzVTnqpA4FsRJ 5H1tsp+bcXVE0MevjHzLoq2hEjQvJbdnlz2EGt5LhFNbIp/um8ZEg6/5TLOAVWeJga4K Vpm4ExWfw788MlRsX7lnXrcraFwgSMrmJ+v9LC2mlti3MnPKXYI6RnlPxHQ+YbTp6BET LTKg== X-Gm-Message-State: AOJu0YyXLUu+P9sdDcI8+WjxPwboMBUeRHZnU1qoDm6mw5O0xD6VkP42 laYv4GDIGpMUHchLM6WLsaj2FV7p7Rh34w== X-Received: by 2002:a05:6512:1196:b0:502:d765:a7c9 with SMTP id g22-20020a056512119600b00502d765a7c9mr520lfr.28.1694521540288; Tue, 12 Sep 2023 05:25:40 -0700 (PDT) Received: from WBEC325.dom.local ([185.188.71.122]) by smtp.gmail.com with ESMTPSA id g21-20020ac25395000000b004fe333128c0sm1737327lfh.242.2023.09.12.05.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 05:25:39 -0700 (PDT) From: Pawel Dembicki To: netdev@vger.kernel.org Cc: Dan Carpenter , Simon Horman , Pawel Dembicki , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 0/8] net: dsa: vsc73xx: Make vsc73xx usable Date: Tue, 12 Sep 2023 14:21:53 +0200 Message-Id: <20230912122201.3752918-1-paweldembicki@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 05:26:04 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email This patch series focuses on making vsc73xx usable. The first patch was added in v2; it switches from a poll loop to read_poll_timeout. The second patch is a simple conversion to phylink because adjust_link won't work anymore. The third patch introduces a definition with the maximum number of ports to avoid using magic numbers. The fourth patch implements port state configuration, which is required for bridge functionality. STP frames are not forwarded at this moment. BPDU frames are only forwarded from/to the PI/SI interface. For more information, see chapter 2.7.1 (CPU Forwarding) in the datasheet. Patches 5-8 provide a basic implementation of tag8021q functionality with QinQ support, without VLAN filtering in the bridge and simple VLAN awareness in VLAN filtering mode. Pawel Dembicki (8): net: dsa: vsc73xx: use read_poll_timeout instead delay loop net: dsa: vsc73xx: convert to PHYLINK net: dsa: vsc73xx: Add define for max num of ports net: dsa: vsc73xx: add port_stp_state_set function net: dsa: vsc73xx: Add vlan filtering net: dsa: vsc73xx: introduce tag 8021q for vsc73xx net: dsa: vsc73xx: Implement vsc73xx 8021q tagger net: dsa: vsc73xx: Add bridge support drivers/net/dsa/Kconfig | 2 +- drivers/net/dsa/vitesse-vsc73xx-core.c | 800 +++++++++++++++++++++---- drivers/net/dsa/vitesse-vsc73xx.h | 17 + include/net/dsa.h | 2 + net/dsa/Kconfig | 6 + net/dsa/Makefile | 1 + net/dsa/tag_vsc73xx_8021q.c | 91 +++ 7 files changed, 806 insertions(+), 113 deletions(-) create mode 100644 net/dsa/tag_vsc73xx_8021q.c -- 2.34.1