Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2405363rdg; Mon, 14 Aug 2023 01:03:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2gn621CFKQ6Pf7T9emeNHSO7PPafaVFoWu5EzUVNGNEhzTBHoFDvF84LrHEbFVaTfLNY4 X-Received: by 2002:a05:6a20:4327:b0:12f:c0c1:d70 with SMTP id h39-20020a056a20432700b0012fc0c10d70mr8698647pzk.40.1692000218565; Mon, 14 Aug 2023 01:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692000218; cv=none; d=google.com; s=arc-20160816; b=ICEoBYC9wVpwsM/m55V1RSr+yFYAp/4iO7FNE3UxQyG0b92kMvyaIqoDa8jcCfCN6L 4rhyiztNm7JBTjKFCubIX5yM6mfx0AFgNBNVoharGsMmoDMTN8e46RHFqMIwkG8TI4h+ XiZFf37GDTeNbAUFVVjkmMIShwBomUQCe/YpylgGukcqHwciWqgXK5yYQq/ve4Pb5PHa U/tw6Us+A3vtEZhTB1gkZm7XkTC00T+MfkxjKXSQA+Y8gSldWSg+tnXiHWylzKUAOW37 wCm5cCBNC6InW5HM8Gt3jfyUKgROF4J5QY66++EuV1OLzPA/Io1p7FSggJ6GBWfovKQh 0m/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=BBL9irmWHTMujcW4M1YOlLfxnMuczJQ+8mOVXEk0MVk=; fh=5I2xzCiBhuV7wqs0koRtHD2Io/WQdISqypoCic3yrH0=; b=UlX5qr7dooK373srSTqN4LMd4J37zxGBCM06x78syi0p2JbVUZIBWkBWBNNnYA+qmS QMdVB7WrRfdMpRth5tN3H1ZXO1PKZYVA13LRnARpV2DQT9J52GL7o8P4/jm6Zr334SGB 2YcCSpj+c/gMo2rneT3zYaVDV6XY3vNKUtBtZB8Ja0Ygl371xKCb8Fo5URTnCe9XHMqQ 8TzjkbobyEk2gxuvTVG1G40bty3DHK5jKM83c9Z0N2vCMi8jE4hjDBLrPcdWDG6xG39f JszMp9wO0FU7x1g8pIBFR05sUChhvD5m3Y9y7iyUHYafgj0eFz9LgscvcARTyr0SrOOV KZTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P1iq/wXb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a170902d4c300b001b828f8dd13si7925884plg.340.2023.08.14.01.03.10; Mon, 14 Aug 2023 01:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P1iq/wXb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234238AbjHNHmG (ORCPT + 99 others); Mon, 14 Aug 2023 03:42:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234333AbjHNHl6 (ORCPT ); Mon, 14 Aug 2023 03:41:58 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D75E4 for ; Mon, 14 Aug 2023 00:41:57 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fea0640d88so1824935e9.2 for ; Mon, 14 Aug 2023 00:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691998916; x=1692603716; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=BBL9irmWHTMujcW4M1YOlLfxnMuczJQ+8mOVXEk0MVk=; b=P1iq/wXbOo9batstDzGV9YJzd+25bRwaiWK6awDIC0BZVCTq6Ne82lsk/7vIeDXZA+ 1vDti1FRtCZExgKWGz5fFWlczEQwtema0pHr1L2vCySRLS9DIEwvoRGPs2CmakOLi0JC Gl5AMM894PvoEEcRkVbJfplm/NQfo/LMYT7kFUMlwFcsifvJc9bdbDqb/I1eWNA38fyu 4wu7ZmrvPaoUMEc9o//9Pnavsn8iuX0WDtqufc2T/T3y3YBQPNddnP6yQwdGMpVpyc9N 56ooqAUo7xmTVH1gRb0RX1AGItygrf1MvFO3w7bzVJAE4UHzAe/CZbq1t8w60wiF46g+ v7mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691998916; x=1692603716; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BBL9irmWHTMujcW4M1YOlLfxnMuczJQ+8mOVXEk0MVk=; b=P/3P7EK6AEc8TsZPwUE0WLh7ixCRlrLj87F0dbkQejDEH+XL0dUllpIKF4nDuLCVBG V3m8nm3JWLsZths6QMDlInRa/Q6LodxRc+jd5h2x3hxsaFPxnxPrquSbc8fQI6tACt6L J9RE6wZmmTmHGkA6Flgii6q/Zx6c+WXOtHBLJ/f3vzx2lb9dxLRJeTEHrQm9fWGn2UJj zpM03/cVBCRKcp+lJLxKO9rLTfdMJ1gyznjm5/WWx5YSdgfE9khKro9VKRLLz6pGeEj1 6B/Gio9P5DEz7KCpqLNgyZTHfijgelvg8mf0S61l72ca0WDcr0dkjSUfqsFRIc9gifsx KQDg== X-Gm-Message-State: AOJu0YzCE+qfmLd20JkTKvT3ftq+rToos7xblfbW/iSVCTdDSmz+tsVg R2iN279gtDoxS6KIh9+Jfq8IoQ== X-Received: by 2002:a7b:ce05:0:b0:3fb:ffa8:6d78 with SMTP id m5-20020a7bce05000000b003fbffa86d78mr6531169wmc.36.1691998915875; Mon, 14 Aug 2023 00:41:55 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:a3d8:b217:d82c:9bc0? ([2a01:e0a:982:cbb0:a3d8:b217:d82c:9bc0]) by smtp.gmail.com with ESMTPSA id z15-20020a1c4c0f000000b003fc0505be19sm13452478wmf.37.2023.08.14.00.41.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Aug 2023 00:41:55 -0700 (PDT) Message-ID: <4de07b08-5eda-86d7-8925-f2fadbfca407@linaro.org> Date: Mon, 14 Aug 2023 09:41:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v2] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Content-Language: en-US To: Luke Lu , linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org Cc: Thinh Nguyen , Greg Kroah-Hartman , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Da Xue , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20230809212911.18903-1-luke.lu@libre.computer> Organization: Linaro Developer Services In-Reply-To: <20230809212911.18903-1-luke.lu@libre.computer> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/2023 23:29, Luke Lu wrote: > 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 > > --- > Note here, the commmit of Fixes tag is the first patch which bring > suspend/resume function, so let's use it as the fix tag. > > As commit 5b0ba0caaf3a: (usb: dwc3: meson-g12a: refactor usb init)" > introduced the use_post_init() function, and this patch will explicitly > depend on it, so let's set kernel version higher or equal to v5.8. > > Changes since v1: > - add Fixes tag and Cc stable tree > --- > drivers/usb/dwc3/dwc3-meson-g12a.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c > index e99c7489dba0..2c07c038b584 100644 > --- 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_g12a_resume(struct device *dev) > return ret; > } > > + if (priv->drvdata->usb_post_init) { > + ret = priv->drvdata->usb_post_init(priv); > + if (ret) > + return ret; > + } > + > return 0; > } > Acked-by: Neil Armstrong