From patchwork Wed Sep 9 21:10:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1361074 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=GTdv9t+a; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wwBKCWXK; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bmvqx5p4Vz9sTH for ; Thu, 10 Sep 2020 07:13:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MyimmOdOlUsbnY1u12DpZYk0zowEUZ8NdNf08tv7yYw=; b=GTdv9t+aTDq0O8MFsre9V5MxKm 6oqJVtrFTUlUdnKwGOu9mikethHMcd40/CftEoDOHmhXob/oOM97hvEwmLqiNd4yitakbkySBy3lZ fNuqj3FgGr9kfTfVwKvfYNQ6Kw0kvFZ7ILy/HE1vANyxt2xlV7kctfg1NIOfdIMC8EdWbHz0937U3 hYY5JyYxbl2ftzqkCYt8lw9icho+mPydYqPm6sbWIiX8Gu89gkIuFsI5XvZsidkn0svCS+VG/dzyp 6H4M/oZB+jgdN/UG4ljxOOFay7mW9HP2PJ5zxNaxd4zfOlfcuoa+KADzi3oONg2s94IZIk2qtAmUQ EH+PE8Aw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG7Mo-0004OR-Gk; Wed, 09 Sep 2020 21:10:58 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG7Ml-0004NY-ON for openwrt-devel@lists.openwrt.org; Wed, 09 Sep 2020 21:10:56 +0000 Received: by mail-lf1-x144.google.com with SMTP id q8so2385406lfb.6 for ; Wed, 09 Sep 2020 14:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ugXoDP+tdJcDKujmWAnLIb/ipMTt6GJf/+vTQQdDUnw=; b=wwBKCWXKbGopETkupNkOLpIb/UejVpeX3fev+ZG44U0xm2YLvbepTibEcoaep0Z2G+ cNn10ebXRPoTcCYDEac1hlqZJsYE+rJxYFNOLjq2l77tKuf4AXR/vSNhvAd4e6eBq+sx 2Obbpp4c5EaeNHpydwdHBqBUsHVx/HMg1JjuVGJM2xlMrCU6denkK6oddDS5ly//yY8a kbJ82T/LbBtOtEZpWLqnxrvWshQFGrUli16rBC+T6ItdBbtEpzPoj2IC+JdBGmz6AaIv 0dRO5BvnjVAQLasJXSPKVsmk4x+kkEqGXJ8fKMBmelzYuyARGXAygREASZ97MeZ7bvb+ 6Dfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ugXoDP+tdJcDKujmWAnLIb/ipMTt6GJf/+vTQQdDUnw=; b=BdQRxwWMJbbfuIGCiAcZIIVZSaApXsCzCHvs4dITOizy91pB76Dm9Qy54o/NG15F5R G7CTycd2Mai+r2HKkCvCLpbo2lxL8MF0GG+bEjzowqz/VeUKxVOzt4fZyXaJYQpzQGQe zRfa5apSbEoDkQLMxq5kyZkwEDSEGfAVIFnTd4dEyyUBnJRF13UqRm/CEHWUfQskVhVD 5ApeBpGOGKIZo7PiRTJJcmtDG7DLcdgmuIvfcLn37eBWUZNo96B+I0GXA8RFURNawczU yxT8MY4JkPP5TQnfChVjWLlLkZ9fZ3Iilzsowv8tD/b8W24K7ATlhAcKN0axCKeOMnNi kzEQ== X-Gm-Message-State: AOAM531EwKQUVZ7rMslZk0mxA3HJ9WbmBJWqZDe3rTP0kDUDRemY7lIt GCy4ilH/SvI1HfWU1W3GqD+mcg== X-Google-Smtp-Source: ABdhPJxtf8wzg8ZEEriQeu1D6eo1m5dKfJ6f/6SD7GAs6YVlBav01oH3xBrLwYEzfY1bzmRJ6Hizkg== X-Received: by 2002:a19:41c8:: with SMTP id o191mr2778087lfa.176.1599685852183; Wed, 09 Sep 2020 14:10:52 -0700 (PDT) Received: from linux.local (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id h22sm1006997ljl.101.2020.09.09.14.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 14:10:51 -0700 (PDT) From: Linus Walleij To: Roman Yeryomin , Sebastian Luft , Hans Ulli Kroll , Hauke Mehrtens , Christian Lamparter Subject: [PATCH v4] gemini: Bring up DSA switches Date: Wed, 9 Sep 2020 23:10:11 +0200 Message-Id: <20200909211011.63229-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_171056_055410_085224EA X-CRM114-Status: GOOD ( 14.31 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:144 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pawel Dembicki , Linus Walleij , Florian Fainelli , openwrt-devel@lists.openwrt.org Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org First group the interfaces on the DSA switch into the right LAN/WAN groups. Tested successfully on the D-Link DIR-685 with the RTL8366RB DSA switch. The RTL8366RB is DSA custom tagged and now handled by the kernel tag parser. (Backported.) The Vitesse switches are not capable of supporting DSA per-port tagging. We suspect they must be handled using some custom VLAN set-up. Cc: Pawel Dembicki Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Rebased patch. - This now works as expected on the D-Link DIR-685 with the upstream DSA patches. - For the Vitesse routers I don't know what to do, but it should be "something like this" eventually. I think it looks better with this script than without it actually. ChangeLog v2->v3: - Actually remove the eth1 from the lan list as well on the Gemini SL93512r. ChangeLog v1->v2: - Remove the eth1 from the LAN bridge in both the Vitesse switch devices, instead bring up each ethernet master interface independently with "none" protocol. --- .../gemini/base-files/etc/board.d/02_network | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 target/linux/gemini/base-files/etc/board.d/02_network diff --git a/target/linux/gemini/base-files/etc/board.d/02_network b/target/linux/gemini/base-files/etc/board.d/02_network new file mode 100755 index 000000000000..e2fce015fb44 --- /dev/null +++ b/target/linux/gemini/base-files/etc/board.d/02_network @@ -0,0 +1,27 @@ +#!/bin/sh + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +storlink,gemini324) + # These are all connected to eth1 thru VSC7385 + ucidef_set_interface "eth" ifname "eth1" protocol "none" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth0" + ;; +itian,sq201) + # These are all connected to eth1 thru VSC7395 + ucidef_set_interface "eth" ifname "eth1" protocol "none" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth0" + ;; +dlink,dir-685) + # These are all connected to eth0 thru RTL8366RB + ucidef_set_interface "eth" ifname "eth0" protocol "none" + ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan" + ;; +esac + +board_config_flush + +exit 0