From patchwork Wed Feb 23 11:34:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 12756831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AACAC433F5 for ; Wed, 23 Feb 2022 11:56:36 +0000 (UTC) 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:Date:Message-Id:MIME-Version:Subject:Cc :To:From:References:In-Reply-To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DgVuWQhBYzLmbFsYEXnC9Eak+HQk4BTwXTitBLJrFFQ=; b=k7cndjZFSCkn/U GyYJLPXna8dZcAXxV6nCyk0+/BbgU46lz/eGTmFBYc2+ubu7yiYeu74XfaxQTl3uR8qI2AEHOUYOR BUJB3KbTtUAUAIbMnWushoeH9ohBzIUlZWOal3b8UVdf90LqdWEutHqHeEjGmjdG9bOFQ/b4KMkJk 7r1COduNHeuIVNlAY+GOuTlKnideN7KwWI84yD41G0p1G8eE1KDk/pTeUipmB/M/5b7EL31TY/18J g6hPKNJIlFW3jaB137dpI1/oSEh7oPd2YkuXYo40XVwoyFi/nqtdCoDir+adGLh7hkNnS2Op8g+Qh qc6iHMadaaFXIAFZu8Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMqFv-00E13L-IA; Wed, 23 Feb 2022 11:56:27 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMpwW-00DtXS-1p; Wed, 23 Feb 2022 11:36:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To: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=/TBPuX7IT8bmtGSUBx1jg5RSVUKUK9jttrHA71x7FdQ=; b=oVIfzWCEQLpZqPU/nLOMo+i4Lh 9hqQ8QP3ah3PizqxCa0KEsEyZWLi4sFy+JRDkv7weG4wuvgrsKPpvbCxVtggOi2ygF8IFeMSXFMDM pRq69RhoHCGUrEm8GrtTOEOwYHkv4ONSvAoGhoSEjqWvO+rSW7fx1t/y/fqyc6NArqMNM96OikPXc k10rY9EdudydGqo7tmtogOcQlQ1VeHt7x0tdJuR8ssq3p5pq/r33WrN1ivF3ik/FOx20dw5VcxDgl +0I9modjhH8DWGzP05CDjR0Tp6FPPJfROwPjn6M5udLSo9rUEy1cRlKOGVtqUGgIuM14sGAKtNj/w xaygavzg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:57374 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nMpuU-0002iv-1A; Wed, 23 Feb 2022 11:34:18 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nMpuT-00AJoW-Dq; Wed, 23 Feb 2022 11:34:17 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Landen Chao , DENG Qingfang , Sean Wang Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH RFC net-next v2 01/10] net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 23 Feb 2022 11:34:17 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_033624_124752_80446FF5 X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Discussing one of the tests in mt753x_phylink_validate() with Landen Chao confirms that the "||" should be "&&". Fix this. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Signed-off-by: Russell King (Oracle) --- drivers/net/dsa/mt7530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index f74f25f479ed..69abca77ea1a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2936,7 +2936,7 @@ mt753x_phylink_validate(struct dsa_switch *ds, int port, phylink_set_port_modes(mask); - if (state->interface != PHY_INTERFACE_MODE_TRGMII || + if (state->interface != PHY_INTERFACE_MODE_TRGMII && !phy_interface_mode_is_8023z(state->interface)) { phylink_set(mask, 10baseT_Half); phylink_set(mask, 10baseT_Full);