From owner-dev-commits-src-main@freebsd.org Sat May 22 22:53:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40EE963958F; Sat, 22 May 2021 22:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fndzw19xGz4dTj; Sat, 22 May 2021 22:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 115DA4B7D; Sat, 22 May 2021 22:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14MMrFA9066513; Sat, 22 May 2021 22:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14MMrFlK066512; Sat, 22 May 2021 22:53:15 GMT (envelope-from git) Date: Sat, 22 May 2021 22:53:15 GMT Message-Id: <202105222253.14MMrFlK066512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 114f4b17d5b6 - main - [ar71xx] During reset, don't spin, just keep trying MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 114f4b17d5b60a5d53ca98f08cc7e8d78c6984de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2021 22:53:16 -0000 The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=114f4b17d5b60a5d53ca98f08cc7e8d78c6984de commit 114f4b17d5b60a5d53ca98f08cc7e8d78c6984de Author: Adrian Chadd AuthorDate: 2021-04-19 05:48:13 +0000 Commit: Adrian Chadd CommitDate: 2021-05-22 22:53:00 +0000 [ar71xx] During reset, don't spin, just keep trying I've seen this fail from time to time and just hang during reset. Instead of it just hanging, just poke it again. I've not seen it fail in hundreds of test resets now. Tested: * AR9344 AP/STA configuration --- sys/mips/atheros/ar71xx_machdep.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/mips/atheros/ar71xx_machdep.c b/sys/mips/atheros/ar71xx_machdep.c index 2bb6d5845d16..72beec972de2 100644 --- a/sys/mips/atheros/ar71xx_machdep.c +++ b/sys/mips/atheros/ar71xx_machdep.c @@ -80,10 +80,13 @@ platform_cpu_init() void platform_reset(void) { - ar71xx_device_stop(RST_RESET_FULL_CHIP); - /* Wait for reset */ - while(1) - ; + while(1) { + printf("%s: resetting via AHB FULL_CHIP register...\n", __func__); + ar71xx_device_start(RST_RESET_FULL_CHIP); + DELAY(100 * 1000); + ar71xx_device_stop(RST_RESET_FULL_CHIP); + DELAY(1000 * 1000); + } } /*