From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King (Oracle) Date: Thu, 25 Nov 2021 15:35:36 +0000 Subject: [PATCH v2] mdio: aspeed: Fix "Link is Down" issue In-Reply-To: <20211125024432.15809-1-dylan_hung@aspeedtech.com> References: <20211125024432.15809-1-dylan_hung@aspeedtech.com> Message-ID: List-Id: To: linux-aspeed@lists.ozlabs.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Nov 25, 2021 at 10:44:32AM +0800, Dylan Hung wrote: > The issue happened randomly in runtime. The message "Link is Down" is > popped but soon it recovered to "Link is Up". > > The "Link is Down" results from the incorrect read data for reading the > PHY register via MDIO bus. The correct sequence for reading the data > shall be: > 1. fire the command > 2. wait for command done (this step was missing) > 3. wait for data idle > 4. read data from data register > > Fixes: f160e99462c6 ("net: phy: Add mdio-aspeed") > Cc: stable at vger.kernel.org > Reviewed-by: Joel Stanley > Signed-off-by: Dylan Hung Reviewed-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! From mboxrd@z Thu Jan 1 00:00:00 1970 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 0E176C433EF for ; Thu, 25 Nov 2021 15:37:54 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BYGNFw5uFEj08V6HMCoa6BdAmUqxJs1hrRMgOooROXk=; b=3fp0PG/yNsB3Vn mAlD54ufGHxHeo9nqNaIlUAVmTXBBshSwii9V6NZ7Wmo2jGBMwKQVQh3jQKi0+AuET2AOUNSumXQl FRt0AszqXvOA2LCug0r6mIIj4EL736L5OcIEhKWiC1RObecwEyssd/5bzWjfkTM9Dj8XXXWeqDltr 2crjWCw3G1aHDFFxUDFo8Gh7BOZQ0U0jjyQLTi5z1pniMeHCTP/Kc2h35S0LXIpnPED20Z3iXYbK1 nZc8+pUUNv8YBj4Ocl5L+jXnftyAAL8/zuibTU4GI5pAXK0CpXg92R/yQe6Aab/2EQHnO77bQtbzx o92ve7IAxf4a4kxiHqDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqGn0-0083e2-MQ; Thu, 25 Nov 2021 15:35:59 +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 1mqGmu-0083am-NL for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 15:35:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=4ZeojgPqWWrsMI5BHeJYX983PNTgh8dQN9F2ioLGkIs=; b=fBMUWHnUBpQs3qU9Nq4aPHReY7 19sN6LtcvO+1tO01gi432dy2Hr+LDGv9p/F5YxpbSsTLAZzUd+q6A6Ng5b1x4nTEyM9SWKJKHBKSh poCFCNfK5RS40voK6YrugKO6S6MJkzOORq2mOMfXI/ZiFJd8BrE1185BQuV6caPzxIKAK9I5WwUow ilQzkFMVKVpt+JcV0WJOlgBoi+5gzyLIlKwC0k7Sxpyn9/h+v57wOJYaKvSGxswIpI6/8OIncVi6K H2JI9zCtBYIEqdR9uSEGdxW+UQRSfYnweSMLMqXFSUcLoXviemf8ml7FRMhxSu+UtU2Aae14IkhEM MDvlN7oA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55896) 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 1mqGmi-000240-E6; Thu, 25 Nov 2021 15:35:40 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mqGme-0002Oo-7d; Thu, 25 Nov 2021 15:35:36 +0000 Date: Thu, 25 Nov 2021 15:35:36 +0000 From: "Russell King (Oracle)" To: Dylan Hung Cc: linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, kuba@kernel.org, davem@davemloft.net, hkallweit1@gmail.com, andrew@lunn.ch, BMC-SW@aspeedtech.com, stable@vger.kernel.org Subject: Re: [PATCH v2] mdio: aspeed: Fix "Link is Down" issue Message-ID: References: <20211125024432.15809-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211125024432.15809-1-dylan_hung@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_073552_803686_DC382906 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 25, 2021 at 10:44:32AM +0800, Dylan Hung wrote: > The issue happened randomly in runtime. The message "Link is Down" is > popped but soon it recovered to "Link is Up". > > The "Link is Down" results from the incorrect read data for reading the > PHY register via MDIO bus. The correct sequence for reading the data > shall be: > 1. fire the command > 2. wait for command done (this step was missing) > 3. wait for data idle > 4. read data from data register > > Fixes: f160e99462c6 ("net: phy: Add mdio-aspeed") > Cc: stable@vger.kernel.org > Reviewed-by: Joel Stanley > Signed-off-by: Dylan Hung Reviewed-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3315FC4321E for ; Thu, 25 Nov 2021 15:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356206AbhKYPsx (ORCPT ); Thu, 25 Nov 2021 10:48:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356170AbhKYPqw (ORCPT ); Thu, 25 Nov 2021 10:46:52 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B99B1C0617A2; Thu, 25 Nov 2021 07:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=4ZeojgPqWWrsMI5BHeJYX983PNTgh8dQN9F2ioLGkIs=; b=fBMUWHnUBpQs3qU9Nq4aPHReY7 19sN6LtcvO+1tO01gi432dy2Hr+LDGv9p/F5YxpbSsTLAZzUd+q6A6Ng5b1x4nTEyM9SWKJKHBKSh poCFCNfK5RS40voK6YrugKO6S6MJkzOORq2mOMfXI/ZiFJd8BrE1185BQuV6caPzxIKAK9I5WwUow ilQzkFMVKVpt+JcV0WJOlgBoi+5gzyLIlKwC0k7Sxpyn9/h+v57wOJYaKvSGxswIpI6/8OIncVi6K H2JI9zCtBYIEqdR9uSEGdxW+UQRSfYnweSMLMqXFSUcLoXviemf8ml7FRMhxSu+UtU2Aae14IkhEM MDvlN7oA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55896) 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 1mqGmi-000240-E6; Thu, 25 Nov 2021 15:35:40 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mqGme-0002Oo-7d; Thu, 25 Nov 2021 15:35:36 +0000 Date: Thu, 25 Nov 2021 15:35:36 +0000 From: "Russell King (Oracle)" To: Dylan Hung Cc: linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, kuba@kernel.org, davem@davemloft.net, hkallweit1@gmail.com, andrew@lunn.ch, BMC-SW@aspeedtech.com, stable@vger.kernel.org Subject: Re: [PATCH v2] mdio: aspeed: Fix "Link is Down" issue Message-ID: References: <20211125024432.15809-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211125024432.15809-1-dylan_hung@aspeedtech.com> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 25, 2021 at 10:44:32AM +0800, Dylan Hung wrote: > The issue happened randomly in runtime. The message "Link is Down" is > popped but soon it recovered to "Link is Up". > > The "Link is Down" results from the incorrect read data for reading the > PHY register via MDIO bus. The correct sequence for reading the data > shall be: > 1. fire the command > 2. wait for command done (this step was missing) > 3. wait for data idle > 4. read data from data register > > Fixes: f160e99462c6 ("net: phy: Add mdio-aspeed") > Cc: stable@vger.kernel.org > Reviewed-by: Joel Stanley > Signed-off-by: Dylan Hung Reviewed-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!