From patchwork Sat Mar 13 16:45:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1452506 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=Z6EgFl2c; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=MQzdynY9; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4DyTCD1LFwz9sRR for ; Sun, 14 Mar 2021 03:48:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=0bXXpRQRgI6d6QrR2ZIckq62QAU43yN4Z4DlPnizt3k=; b=Z6EgFl2cu18zdqCzASPvg6l4e O8sgGV3hesG+Bz7QM5PmxLLp1f+aAgJjvypr8ETqkgz1ViCOHcDfingfJnuVOu3yx3ifKSlKLDHy0 TBP9na2QwyMamhVgyc5VWgR0ECzx9GNDXyXsVRmm4IQ+yLN5GyJ7OAhY8YBOBMKqrDw9w29hkzjaS vnQTeKb55U/PQq3v7YkYO1PQ5PnfO7D0U+3I6BqDVC5PbvOUVm88EwaI0vIP3LXEoYXOFdEGutkec t6pwz33B+9+la5m9UiLds9oz6/p86atcr8iPb4KDMcy2fB5dJip+oGCM/OPAoY5A976VeLj3lAXOs zaq14JSIA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lL7PV-00DN4D-3i; Sat, 13 Mar 2021 16:46:41 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lL7Ow-00DN0m-Vf for openwrt-devel@lists.openwrt.org; Sat, 13 Mar 2021 16:46:09 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 12DGk2gD007349 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Sat, 13 Mar 2021 17:46:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615653962; bh=ClXf95hHwCbFmPkmFVFLXQoLyDmhWbJC6m4XV8UO88k=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=MQzdynY9HM8eQisGZ2/yK5mxSkHbZx+6BFsK45sqCe7IP+zTQGRr/a4Jo6GCx1ZwK nsSQSWXxzgb2eews5rOGSDjmqF16iUJxfU9/Ee1nELylJOwi06yxxGKYsw1KQ/Nt3K 4ClvUARW+oNKkx/araF2PneMOTBtL2Hq+d2dELyE= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 12DGk2ch007339; Sat, 13 Mar 2021 17:46:02 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= , Birger Koblitz Subject: [PATCH v2 1/6] realtek: fix link-state interrupt Date: Sat, 13 Mar 2021 17:45:49 +0100 Message-Id: <20210313164554.7284-2-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210313_164607_293946_AB5609F7 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=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__This_bug_was_the_root_cause_for_the_fa?= =?unknown-8bit?q?iling_sfp_driver=2E_Acked-by=3A?= =?unknown-8bit?q?_Birger_Koblitz_=3Cmail=40birger-koblitz=2Ede=3E_Signed-off?= =?unknown-8bit?q?-by=3A_Bj=C3=B8rn_Mork_=3Cbjorn=40mork=2Eno=3E?= =?unknown-8bit?q?_---_=2E=2E=2E/realtek/files-5=2E4/drivers/net/dsa/rtl83xx/?= =?unknown-8bit?q?common=2Ec_=7C_7_+++----_1?= =?unknown-8bit?b?IGZpbGUgY2hhbmdlZCwgMyBpbnNlcnRpb25zKCspLCA0IGQgWy4uLl0g?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?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=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?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=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_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 This bug was the root cause for the failing sfp driver. Acked-by: Birger Koblitz Signed-off-by: Bjørn Mork --- .../realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c index 698f2892ea1e..197a96f8ad13 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c @@ -555,7 +555,6 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) int err = 0, i; struct rtl838x_switch_priv *priv; struct device *dev = &pdev->dev; - u64 irq_mask; u64 bpdu_mask; pr_debug("Probing RTL838X switch device\n"); @@ -650,9 +649,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) /* Enable link and media change interrupts. Are the SERDES masks needed? */ sw_w32_mask(0, 3, priv->r->isr_glb_src); - - priv->r->set_port_reg_le(irq_mask, priv->r->isr_port_link_sts_chg); - priv->r->set_port_reg_le(irq_mask, priv->r->imr_port_link_sts_chg); + + priv->r->set_port_reg_le(priv->irq_mask, priv->r->isr_port_link_sts_chg); + priv->r->set_port_reg_le(priv->irq_mask, priv->r->imr_port_link_sts_chg); priv->link_state_irq = platform_get_irq(pdev, 0); pr_info("LINK state irq: %d\n", priv->link_state_irq);