From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01A756FA7 for ; Sun, 17 Sep 2023 19:17:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EB7CC433C8; Sun, 17 Sep 2023 19:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694978255; bh=EohJLrEoOvb8ggYwESR+ZD1ATwzUgZUwQ57p3Mnt8GM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GlAEaT9fkX/wg4YtyVtgsIrsQZs1203PVx42uKR8WOIIxyNIn2j80c3VeMQGhP6gn o2j/lCygMvpL2YTyjh9bVHUAxY+OPR9gBn7+4mVeGLYiV8sYYURw0Lxnoq7tGwboca NkwppLDmhEptggDd06VsyQ/iT+cGGwz/ddKHGTxs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luke Lu , Neil Armstrong Subject: [PATCH 5.10 009/406] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Date: Sun, 17 Sep 2023 21:07:43 +0200 Message-ID: <20230917191101.348819122@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191101.035638219@linuxfoundation.org> References: <20230917191101.035638219@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luke Lu commit 1fa206bb764f37d2ab4bf671e483153ef0659b34 upstream. Device connected to usb otg port of GXL-based boards can not be recognised after resumption, doesn't recover even if disconnect and reconnect the device. dmesg shows it disconnects during resumption. [ 41.492911] usb 1-2: USB disconnect, device number 3 [ 41.499346] usb 1-2: unregistering device [ 41.511939] usb 1-2: unregistering interface 1-2:1.0 Calling usb_post_init() will fix this issue, and it's tested and verified on libretech's aml-s905x-cc board. Cc: stable@vger.kernel.org # v5.8+ Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue") Signed-off-by: Luke Lu Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20230809212911.18903-1-luke.lu@libre.computer Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/dwc3-meson-g12a.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -931,6 +931,12 @@ static int __maybe_unused dwc3_meson_g12 return ret; } + if (priv->drvdata->usb_post_init) { + ret = priv->drvdata->usb_post_init(priv); + if (ret) + return ret; + } + return 0; }