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 30CF3C83F33 for ; Mon, 4 Sep 2023 18:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240044AbjIDSbi (ORCPT ); Mon, 4 Sep 2023 14:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238091AbjIDSbi (ORCPT ); Mon, 4 Sep 2023 14:31:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C885CC8 for ; Mon, 4 Sep 2023 11:31:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EE290B80EF5 for ; Mon, 4 Sep 2023 18:31:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C6E2C433C9; Mon, 4 Sep 2023 18:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693852292; bh=xh7FTiBO+JqBg7/IeztxraGmj40UonZHDM2v2P+qZVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pvDQXfY5Ap+6ZP3mFugUn8CYcSx7j5f0c8hHN9m7JzBoXak0E5MSmvubC02Ws8E1l EENkXCQaD+llTGJAMhnCTvZJJp2b3IKOH+A0ksV+ZYY2elrPYFXlbql0BXAVLui3wy EZS8L3L5FeS6gjc883GR97wIv+m7swQvhsRul7wE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luke Lu , Neil Armstrong Subject: [PATCH 6.5 15/34] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Date: Mon, 4 Sep 2023 19:30:02 +0100 Message-ID: <20230904182949.281528840@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230904182948.594404081@linuxfoundation.org> References: <20230904182948.594404081@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-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 @@ -926,6 +926,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; }