| Message ID | 20261117-usb-sunxi-reset-fix-v1-2-c2b76e0e84e1@roadbobek.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27775-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id DF3E21C82A1 for <noreply@patchwork.local>; Tue, 17 Nov 2026 14:00:38 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-27775-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-27775-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id A293C342D5 for <noreply@patchwork.local>; Tue, 17 Nov 2026 13:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794920417; b=Jsi2BZtfwY7osy+EVB2ycSsdoTm8EzFGUf2Wo5wMK+14WB2lNy0Z4knBw6h4D/8KiOua g/r0v/JWrApJYh8MUMOV3DBtzCDtoudwLyabtjeiuLul3aMD07XgZAipZllCPBrRAuHkZ 3KGnCR0JBL1ZwZsUAPtYVf6t7yjyiMXtCln/mR7T2zxm/DehjyVGBtYgDE94i+GP+Z585 3/aplWvoWS6vktZnPxg+xVOpk7+EH00y4CFxtyRks36wKhoSiZNTxyhCqk+V2bL81yTxw +2w/qD2FsQIiIo6cK+c7Xz4wEy6B9rOrZBFjq4uS7LKGmMcI8kSWveypoircl0MFtpA== ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794920417; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+b74yUvLDxoK8sglf86Bsb/v/4MffzabVcgz+/2mtCE=; b=KrQ33wJfzSlZMtrvDLKiQaixxUQugqFfTLNNAZJ/9LvsTohyC4guFQU142uFlEXNLlFv M4bofUizaNc0colxmLGk2/00EitcE/J7JwCCz5fzoHDne59rZjZhaMCrW6ImdQnGtKjAd FuhrRXbRF5IVqYI2mcvnr0agnCettBV+PvKGJCkv4kcnwJA8BumlCCAsCRZC87vYLFIWf BrHFuSS9Q4bFk8vVG2isJnpKNXKl3GDoUclDHCaPzGFVQi3VxfS7kwaRZd13feTJFWwfX eus/+opWZNv3F9e35V9PmdZfnVaFb97DU7MWvsEmt4Lefb/xQ5sxGlZ9bWU0lafJAYw== ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AcMgczfl; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57DC160A260D; Tue, 17 Nov 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AcMgczfl X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794920417; b=tJe/yzsB8e5pO3bLkZM4O0zVk1uoQ9AUYa9LS8bI7BaBhwTCp2ze7JS5G4VRyEgjncHa 2Be7uJmzU8+SfulyL6Gpn5eeQRZ7meDT59FykTOhsOzmhmOId4m+Su/f7g9tfYAuJ0tQz V3eU8YXmv4BEg5Qqwlln8iLMEAgJq2LEjAosFZZpfjOxIzEKMWjrG9OU5pLoq5wuy/H6D WmGzm/cmueAXJPfP8xdSWcXyHjJs90L23PU4r1EMReEnlV69ds1SfzY0udwU9nqLIi1sW lKwxoXeZ/dJhX3AmxxBPPF4sY08GZt7rORZYvo7wDCvFuk5fMAF0GARZE39V4yM/w/Q== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794920417; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+b74yUvLDxoK8sglf86Bsb/v/4MffzabVcgz+/2mtCE=; b=Of/JG7ju3KiBiKZ6teobRbuWglMy6fse95+gu7HobREqmH4rXgCS2Xm6B8d+xJaUiY/7 Vjh/DoaEo4v/eYPP4Mk9SjMoD0XAizqTDhJFFd23ZCbj3Kw/Ecycik1PCUshfYNxFrX3Y 1zkY+TNLVdVHXkF+ivpSC6y483TTDzvpMadUpIC5EXrfx++oIuWJPnTaM3EwXbErEbxrt eSRRCOjH9DzCS/S+AEHCYPsjZaKqAcKykOlEIgQiw56Byjw3pqKFqP+Dn6ituiK8+1TMZ 74cxOGLsRAG4UJqz5RRi6tES5rLrkjWCGX4eoCiBWiidYtfVwlCAShlI7c5xPMv6QCQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AcMgczfl; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 357F5606A88D; Tue, 17 Nov 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1794920417; b=eQZMmPL7PbG95XbrawjYxIxVxxVHtoOP2Hkr9CGBFB2qMoa57aBmUEtYSTAAt2lB/uyA zacnsQjdu3GiRF1Jkhuo2HsflRCD2Rsf/f7LuAcMZxDd31dLH7XzfUVXU0NPcSDtXEhZk qpz9aWm9NCVf4P4tC7vh8kpiyEOFrG+l3Zzw9tjkNV144pWTS8r89RMWqbl0eSavlQtGK R1HvfHSUKq0siil/3+oeFsqODQei5nbpHTV0W/KTKoLkLG1UXmQFw90rNIux8Vv3KW24h h9PWcfwZJsPl0TCMbTQnltQar+C7EzCrMmusdlivwGkValYTztZxr8V2rgbk3zoXHNw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1794920417; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+b74yUvLDxoK8sglf86Bsb/v/4MffzabVcgz+/2mtCE=; b=vRZZWwb9KUR+FTxmLcudhq047r3aFmXqJpn9z5f3XD61m5AA730ajGyuFo/dHPiUUrJN 09SOktWjI877GM3RzTGRXWUvQDVmINOLbZznibfCWKfUCP8XdLhxDSgUx16QhZfmuVJuo Gd7gKKA78iei5dRylZ0TsY7lXXH48UoAqPK+eHUkaPAc6Tw+vSd1sCnv/0e8qZqbfrQcJ jlKu6S3cNCRIUwse1jysAdLvOK76/6jVBQLTpR5jDZO7ixTrPa4GzjedKyaSYXoENjVuZ GMpye2WLGkuyT7enOpqwAuz++WKBHmPlaTzEtB+p16Has0KLh+HMw01whsC2oxXnE5Q== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 171C71F000C7; Tue, 17 Nov 2026 13:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794920417; bh=+b74yUvLDxoK8sglf86Bsb/v/4MffzabVcgz+/2mtCE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=AcMgczflY4FwrwhKc10eeMIlTWR3l85AsApHpANlLGH59OZ2PM7FciXXY0SwsMXai gMcXtlsLaOaM8LLhBXWB7PhFHX1tTeVNVc+Tk7HtjVUQAhkJlCUaosHa0alCYwJvEo OG9vuz7ES2dwpYMtWMNGqW8PDj+Q2hnuDtjptyNIfT9is9rkhxTOSNjnpjC7PoW3Hd fGdKbBqHxLefyiWQaSed3rylCIV9epzZRaRYHLs7Og5OZbA2KAOhFUaAk+Q1+aiun3 eff3mqoYYkBIGpRju0tYvtRQXscQ6TFxcH3txwFTotfQNI1IvoNYkud9WJT89pTEP4 OlqVW/hoXDtrg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 949484A971; Tue, 17 Nov 2026 13:00:15 +0000 (UTC) From: Roadbobek via B4 Relay <devnull+admin.roadbobek.com@kernel.org> Date: Tue, 17 Nov 2026 13:00:43 +0000 Subject: [PATCH 2/2] phy: sun4i-usb: Assert reset before deasserting in phy init X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Post: <mailto:linux-sunxi@lists.linux.dev> List-Help: <mailto:linux-sunxi+help@lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev> Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261117-usb-sunxi-reset-fix-v1-2-c2b76e0e84e1@roadbobek.com> References: <20261117-usb-sunxi-reset-fix-v1-0-c2b76e0e84e1@roadbobek.com> In-Reply-To: <20261117-usb-sunxi-reset-fix-v1-0-c2b76e0e84e1@roadbobek.com> To: Bin Liu <b-liu@ti.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Philipp Zabel <p.zabel@pengutronix.de>, Vinod Koul <vkoul@kernel.org>, Neil Armstrong <neil.armstrong@linaro.org>, Manivannan Sadhasivam <mani@kernel.org> Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Roadbobek <admin@roadbobek.com> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1794920443; l=1163; i=admin@roadbobek.com; s=20261117; h=from:subject:message-id; bh=OVg8qc9Dvbt0DpBBY/dML99s9283yAaJeOiCsaXqahQ=; b=5z7gVCV2tubzbMgwKmN+aLOEQ1vWqqKL1z+6YQv0bljLTSE+qxlA1SMTklz+ncPdxMcuB/qF0 WYOLvj2KjZKCI6wo/koiAq3H3sn2WkQP5ZJ+dadlnl7RRIt2cdEXYw2 X-Developer-Key: i=admin@roadbobek.com; a=ed25519; pk=TcWSTwITMylwCZLYbw80sv2LQx1zButqiT90TFVvhas= X-Endpoint-Received: by B4 Relay for admin@roadbobek.com/20261117 with auth_id=1548 X-Original-From: Roadbobek <admin@roadbobek.com> Reply-To: admin@roadbobek.com Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RBL_SEM_FAIL(0.00)[172.105.105.114:query timed out]; RSPAMD_URIBL_FAIL(0.00)[roadbobek.com:query timed out]; TAGGED_RCPT(0.00)[]; SPAMHAUS_FAIL(0.00)[100.80.115.77:query timed out]; DBL_FAIL(0.00)[roadbobek.com:query timed out]; FORGED_SENDER_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[tor.lore.kernel.org:helo,tor.lore.kernel.org:rdns]; RCPT_COUNT_TWELVE(0.00)[15]; HAS_REPLYTO(0.00)[admin@roadbobek.com]; R_DKIM_ALLOW(0.00)[kernel.org:s=k20260515]; FROM_NEQ_ENVFROM(0.00)[devnull@kernel.org,linux-sunxi@lists.linux.dev]; RBL_VIRUSFREE_UNKNOWN_FAIL(0.00)[172.105.105.114:query timed out]; URIBL_MULTI_FAIL(0.00)[roadbobek.com:query timed out]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,100.103.45.18:received]; TO_DN_SOME(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; DKIM_TRACE(0.00)[kernel.org:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; TAGGED_FROM(0.00)[bounces-27775-noreply=patchwork.local,admin.roadbobek.com]; FREEMAIL_TO(0.00)[ti.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org,pengutronix.de,linaro.org]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.105.105.114:from] X-Rspamd-Queue-Id: DF3E21C82A1 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX |
| Series |
usb/phy: sunxi: Assert reset before deasserting on init
|
|
Commit Message
Roadbobek via B4 Relay
Nov. 17, 2026, 1 p.m. UTC
From: Roadbobek <admin@roadbobek.com> When a bootloader initializes USB before booting Linux without first tearing down the controller, phy->reset may already be deasserted when sun4i_usb_phy_init() runs. Because reset_control_deassert() alone is a no-op on an already deasserted reset line, stale USB PHY state can persist across the bootloader-to-kernel handoff. Assert phy->reset briefly before deasserting it in sun4i_usb_phy_init() so the PHY starts cleanly regardless of prior bootloader USB usage. Tested on an Allwinner A33 Q8 tablet (Laser MID-786). Signed-off-by: Roadbobek <admin@roadbobek.com> --- drivers/phy/allwinner/phy-sun4i-usb.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Di, 2026-11-17 at 13:00 +0000, Roadbobek via B4 Relay wrote: > From: Roadbobek <admin@roadbobek.com> > > When a bootloader initializes USB before booting Linux without > first tearing down the controller, phy->reset may already be > deasserted when sun4i_usb_phy_init() runs. > > Because reset_control_deassert() alone is a no-op on an > already deasserted reset line, stale USB PHY state can > persist across the bootloader-to-kernel handoff. > > Assert phy->reset briefly before deasserting it in > sun4i_usb_phy_init() so the PHY starts cleanly regardless of > prior bootloader USB usage. Tested on an Allwinner A33 Q8 > tablet (Laser MID-786). > > Signed-off-by: Roadbobek <admin@roadbobek.com> > --- > drivers/phy/allwinner/phy-sun4i-usb.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c > index f26eed0db17e..05e6dcf035a1 100644 > --- a/drivers/phy/allwinner/phy-sun4i-usb.c > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c > @@ -270,6 +270,8 @@ static int sun4i_usb_phy_init(struct phy *_phy) > return ret; > } > > + reset_control_assert(phy->reset); No error handling? > + usleep_range(10, 20); > ret = reset_control_deassert(phy->reset); > if (ret) { > clk_disable_unprepare(phy->clk2); regards Philipp
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] phy: sun4i-usb: single-word handle in Signed-off-by trailer - [Medium] phy: sun4i-usb: sun4i_usb_phy_init() asserts shared PHY2 reset - [Low] phy: sun4i-usb: missing Fixes trailer for sun4i_usb_phy_init() reset fix It also noticed 1 related pre-existing issue this patch does not introduce: - [Medium] phy: sun4i-usb: clock reference imbalance in sun4i_usb_phy_init() [1] -- commit 12bd7c6ca5df3e2bb05ffe3f4ddfe21723f76996 Author: Roadbobek <admin@roadbobek.com> > phy: sun4i-usb: Assert reset before deasserting in phy init > > When a bootloader initializes USB before booting Linux without > first tearing down the controller, phy->reset may already be > deasserted when sun4i_usb_phy_init() runs. > > Because reset_control_deassert() alone is a no-op on an > already deasserted reset line, stale USB PHY state can > persist across the bootloader-to-kernel handoff. > > Assert phy->reset briefly before deasserting it in > sun4i_usb_phy_init() so the PHY starts cleanly regardless of > prior bootloader USB usage. Tested on an Allwinner A33 Q8 > tablet (Laser MID-786). > > Signed-off-by: Roadbobek <admin@roadbobek.com> [Severity: High] The Author header and Signed-off-by trailer use a single-word handle (Roadbobek). Documentation/process/submitting-patches.rst requires a known real identity (full human name) for the Developer's Certificate of Origin and does not allow pseudonyms or handles. [Severity: Low] Should this bug fix include a Fixes trailer? Fixes: ba4bdc9e1dc0 ("PHY: sunxi: Add driver for sunxi usb phy") > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c > index f26eed0db17ef..05e6dcf035a1a 100644 > --- a/drivers/phy/allwinner/phy-sun4i-usb.c > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c > @@ -270,6 +270,8 @@ static int sun4i_usb_phy_init(struct phy *_phy) > return ret; > } > > + reset_control_assert(phy->reset); > + usleep_range(10, 20); > ret = reset_control_deassert(phy->reset); > if (ret) { > clk_disable_unprepare(phy->clk2); [Severity: Medium] Can asserting phy->reset here disrupt other active USB PHYs when PHY2 is initialized on SoCs with needs_phy2_siddq set (such as the Allwinner H616)? When sun4i_usb_phy_init() runs for PHY0, PHY1 or PHY3 on those SoCs, it directly deasserts data->phys[2].reset and clears hci_phy_ctl_clear in PHY2's PMU without going through phy_init(phy2->phy): drivers/phy/allwinner/phy-sun4i-usb.c:sun4i_usb_phy_init() { /* Some PHYs on some SoCs need the help of PHY2 to work. */ if (data->cfg->needs_phy2_siddq && phy->index != 2) { struct sun4i_usb_phy *phy2 = &data->phys[2]; ... ret = reset_control_deassert(phy2->reset); } Because sun4i_usb_phy_probe() acquires each reset via devm_reset_control_get() (exclusive, non-refcounted), later initializing PHY2 for ehci2/ohci2 will now pulse data->phys[2].reset low for 10-20 us (or leave it asserted if reset_control_deassert() fails) while PHY0, PHY1 or PHY3 are already active and relying on PHY2 remaining out of reset with SIDDQ cleared. [Severity: Medium] This problem wasn't introduced by this patch, but in the needs_phy2_siddq block right below in sun4i_usb_phy_init(), does [1] clk_disable_unprepare(phy->clk2) disable the wrong clock after enabling phy2->clk2? drivers/phy/allwinner/phy-sun4i-usb.c:sun4i_usb_phy_init() { ret = clk_prepare_enable(phy2->clk2); if (ret) { ... } if (phy2->pmu && data->cfg->hci_phy_ctl_clear) { val = readl(phy2->pmu + REG_HCI_PHY_CTL); val &= ~data->cfg->hci_phy_ctl_clear; writel(val, phy2->pmu + REG_HCI_PHY_CTL); } clk_disable_unprepare(phy->clk2); } Initializing PHY0, PHY1 or PHY3 leaks a prepare/enable reference on phy2->clk2, while prematurely disabling phy->clk2 and causing an underflow in sun4i_usb_phy_exit(). [1] https://sashiko.dev/#/bug/linux-16c490f9-c5d0-4103-a9d3-3f6814c64cb4
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index f26eed0db17e..05e6dcf035a1 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -270,6 +270,8 @@ static int sun4i_usb_phy_init(struct phy *_phy) return ret; } + reset_control_assert(phy->reset); + usleep_range(10, 20); ret = reset_control_deassert(phy->reset); if (ret) { clk_disable_unprepare(phy->clk2);