From patchwork Mon Oct 4 05:12:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 1535940 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=sXIh4DbE; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=RBKOKemb; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HN87l3dg4z9t25 for ; Mon, 4 Oct 2021 16:16:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=gq9nWvJ8k/9cjNkHkbQvkhlFQbl0EADxt8TCCSQo96g=; b=sXIh4DbE9BZYAB g9lAyUBrpoE1gGO4v1meUDNuRzJgCm/+UFmhEQDqDKkYMdsSnohHHK23/EeiKwTeAbfM+wVXUwb39 Jec0lrBhr/2zz8bcJls4dhZESLv/NZXZ1mv9rYD6Qs69WzNU+kShDZBFZCctXEsrrk5u2a1NffEL1 8QpwSj1iX9sv20OTXauNnYaD7qNaXLHKFm1LMEKy+Fcku3c0cv3b/5lCfEaaEJ214F/NP4elB5wTd XvvDuPQnXfw+2tY4ly2S+N+YXqXmcCGLvkWJ0AXgXbaSiaY10nX/cHQNGXID0L1GUDRcQO7nuGMyu y/qo+UkLJX10OHuat/5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXGHR-0058EH-SZ; Mon, 04 Oct 2021 05:12:50 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXGHO-0058Dq-FT for openwrt-devel@lists.openwrt.org; Mon, 04 Oct 2021 05:12:48 +0000 Received: by mail-lf1-x133.google.com with SMTP id n8so11023527lfk.6 for ; Sun, 03 Oct 2021 22:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kKNx2LAscNXh1hBnOUZRzwZJc8AkWtUHianLViLEyks=; b=RBKOKemb6TwBTapkSI4ecCOXb4Y0kVySuWVNCDZIZBlnqZ7GYPvkmNyUoglFpgkUIB YA5SQTZz5ZGZDXLXpifb2L6NZCA51olv2VIHnxKEqH/7kFHc/pE1XBCCWVZsGvnanb2e 5JhQm9sdz04d15t+hbGa55fm9KQVYFYCHcX/gMeCYTygdF7ucc+RfFbvxUhldhEuqv4k r2F7SdMOeixA17qXVgEv6X0bFMApYKAE4DQqpv9gThu8A112tIDWrASDT7X3V8F8DfdZ 0SAW2ey6nSQRWkxsIngl76fs2FOxmMBhcEOqnBCiMgbP7kcliKPEkHxmj8t8UFts0Nn2 t3+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kKNx2LAscNXh1hBnOUZRzwZJc8AkWtUHianLViLEyks=; b=4/56cCKqkO0CpEBNoFpn8vO0386WIx1OZCjFWujYq6qGfio1AHbvyXRugTLibU8afG 6L+Zu1KV6jfyROAbwvXtICjOB0ShgIr7YudEZLkRs7OHLQcW08H5qr+olCcQQI24BwPl 962DD49VTAGyGpDG+Fwdvumbk3umvyN2WWFpboSS7NxnBt1vctW+wJz2XWjJWpBWp9ap 5D1IgKZ0fGi1GKXs7516ZEexyFj6CWVMDB06Wb1u4445CBF1WG1HOtbuzR3TIOH/fMPv HIEdKhupbUoWNN+fZQ4Pg65Mu3gH6rAADtDVKzj1R4dJAnfmPi5j92ADNx52xZnaHjfw VzWg== X-Gm-Message-State: AOAM5302iNN8SvwH7/DJnRixEPKU9Zh6jcP9FmBBK9dHSedJL1YGsJl2 jEb6GK0UDP5T8Gh1wKyh15MknQBSDEs= X-Google-Smtp-Source: ABdhPJwRlWjhcEE++o1FKEdbAglu+YZqAX5oiK/v+BSpClzW/xhjeo1IXHKs/cHmEQmgfqFw2ZmRRQ== X-Received: by 2002:a2e:88ce:: with SMTP id a14mr13437014ljk.96.1633324364166; Sun, 03 Oct 2021 22:12:44 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id u7sm1474918ljh.49.2021.10.03.22.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 22:12:43 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: openwrt-devel@lists.openwrt.org Cc: Vivek Unune , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Tobias Schramm Subject: [PATCH] Revert "swconfig: fix Broadcom b53 support" Date: Mon, 4 Oct 2021 07:12:36 +0200 Message-Id: <20211004051236.21647-1-zajec5@gmail.com> 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-20211003_221246_546607_5314CBD0 X-CRM114-Status: GOOD ( 13.60 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Rafa=C5=82_Mi=C5=82ecki_This_r?= =?unknown-8bit?q?everts_commit_8f9cd1af0f9c325a902dbd0e79e12015372e6bb0=2E?= =?unknown-8bit?q?_That_commit_was_meant_to_add_a_single_EXPORT=5FSYMBOL=5FGP?= =?unknown-8bit?q?L=28=29_but_it_actually?= =?unknown-8bit?q?_also_added_few_=2Eof=5Fmatch=5Ftable-s=2E_One_commit_shoul?= =?unknown-8bit?q?d_handle_one_thing_and?= =?unknown-8bit?q?_should_not_introduce_unrelated_changes=2E_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_no_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoxMzMgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_ab?= =?unknown-8bit?q?used_enduser_mail?= =?unknown-8bit?q?_provider?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freem?= =?unknown-8bit?q?ail_username_ends?= =?unknown-8bit?q?_in_digit?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Rafał Miłecki This reverts commit 8f9cd1af0f9c325a902dbd0e79e12015372e6bb0. That commit was meant to add a single EXPORT_SYMBOL_GPL() but it actually also added few .of_match_table-s. One commit should handle one thing and should not introduce unrelated changes. Regarding actual changes: 1. EXPORT_SYMBOL_GPL is not required as we don't build swconfig drivers as modules. 2. PHY drivers must not have .of_match_table. That is allowed for MDIO drivers. This could work for some time (although is didn't for me on bcm53xx) but does not with kernel 5.10. It causes a soft lockup and upstream developers confirmed it's an unsupported design. Link: https://lore.kernel.org/netdev/2b1dc053-8c9a-e3e4-b450-eecdfca3fe16@gmail.com/t/#mf80e472f35ee23f7a75cbf5b1e101a17ab3a64a3 Cc: Tobias Schramm Signed-off-by: Rafał Miłecki --- .../files/drivers/net/phy/b53/b53_mdio.c | 32 ------------------- .../generic/files/drivers/net/phy/swconfig.c | 1 - 2 files changed, 33 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index 98cdbffe73..6ec23a49a3 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -361,26 +361,6 @@ static int b53_phy_read_status(struct phy_device *phydev) return 0; } -static const struct of_device_id b53_of_match_1[] = { - { .compatible = "brcm,bcm5325" }, - { .compatible = "brcm,bcm5395" }, - { .compatible = "brcm,bcm5397" }, - { .compatible = "brcm,bcm5398" }, - { /* sentinel */ }, -}; - -static const struct of_device_id b53_of_match_2[] = { - { .compatible = "brcm,bcm53115" }, - { .compatible = "brcm,bcm53125" }, - { .compatible = "brcm,bcm53128" }, - { /* sentinel */ }, -}; - -static const struct of_device_id b53_of_match_3[] = { - { .compatible = "brcm,bcm5365" }, - { /* sentinel */ }, -}; - /* BCM5325, BCM539x */ static struct phy_driver b53_phy_driver_id1 = { .phy_id = 0x0143bc00, @@ -392,10 +372,6 @@ static struct phy_driver b53_phy_driver_id1 = { .config_aneg = b53_phy_config_aneg, .config_init = b53_phy_config_init, .read_status = b53_phy_read_status, - .mdiodrv.driver = { - .name = "bcm539x", - .of_match_table = b53_of_match_1, - }, }; /* BCM53125, BCM53128 */ @@ -409,10 +385,6 @@ static struct phy_driver b53_phy_driver_id2 = { .config_aneg = b53_phy_config_aneg, .config_init = b53_phy_config_init, .read_status = b53_phy_read_status, - .mdiodrv.driver = { - .name = "bcm531xx", - .of_match_table = b53_of_match_2, - }, }; /* BCM5365 */ @@ -426,10 +398,6 @@ static struct phy_driver b53_phy_driver_id3 = { .config_aneg = b53_phy_config_aneg, .config_init = b53_phy_config_init, .read_status = b53_phy_read_status, - .mdiodrv.driver = { - .name = "bcm5365", - .of_match_table = b53_of_match_3, - }, }; int __init b53_phy_driver_register(void) diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index a734e57608..f506daaf91 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -1222,7 +1222,6 @@ switch_generic_set_link(struct switch_dev *dev, int port, return 0; } -EXPORT_SYMBOL_GPL(switch_generic_set_link); static int __init swconfig_init(void)