Message ID | 20240220081205.135063-1-raychi@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp256689dyc; Tue, 20 Feb 2024 00:12:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVoeO9LOpDWut14AP40YJfbcFn+q80gRqdp8ZuujzGf1sA6Z345JKDPny19JNveHGGizS/Vw/mcDA3h07I32Et6fkGndw== X-Google-Smtp-Source: AGHT+IG8Z3koTcoo3Qhv1Ji9KIOWGP3z82jdqrG5A21nc62qCmpWZHyyL8uvwDyUw2O7qeYQtVbC X-Received: by 2002:aa7:c61a:0:b0:564:7087:e3d with SMTP id h26-20020aa7c61a000000b0056470870e3dmr3436402edq.14.1708416773332; Tue, 20 Feb 2024 00:12:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708416773; cv=pass; d=google.com; s=arc-20160816; b=Z9bELo383Ser+EjieQnRWYs/6fMfSaB2Z88QAJe2z3cIGO44L6BzStKCZ2QrGhKrMp w6rZW9NB1p+CR0aqm+NIdfS3KN0Jv6KQeAm4gS/uARdLu2mcsCeZSY2LA0yTHEXXSuSZ P6rltKFIbjxgPVJFcDTZ6Py8b6DqczZIvHlYk/+Y0w5GTdmk8fVkD63pEs3z7Vx9w8Rn dHJRJm6137nJmIx8V7GHSIym7M00865qYDKj2dqsKVLhSO/tTla2qPsDGrCiT9NvQtTq ueJJwmxgDAWox/JkjkZsXlTVtVXkRxem+833yWuLIE074UUtaYLS0VyKCbKCQ5KtX0wT qWAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=7NyTQc14Zf/h2SqeLHUekdRb34OTt1i2UvuEmj+OuFE=; fh=L0+VBNu7NpNv63eUqAiAB4XuAVEA6kp+twFw36xxoL0=; b=q36rQJSbUd1jABia9j/QArq20yGuVdceTXMKASCocgCcKQ3Gg0OOiss1Ts7I3CniI+ fMV/0qbtMGBESwny5keqrKw920XVvLiEpIt65QWzA95F63bhns1BFamrpksCjbz6dKv9 tUZ9+9jmUZRmUDV4OyryJ/yE7sBh4bw7sX8KY1OLPWqiPzYKGvnPUXXDjcMJcjDafWpA vH81TsVv0pqFKJmiKmoi60tEWVry/LFbHZ18bFFdn2BMVHlnEhZJND5Tt2AaEy+Khqlj yYO9B6XnmBW0PO0bzPyABfWaClvbcdQwh3WpPB4lGvAkqKY0zbYxXPsGesLaFnipaE3i XU7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g+nggSxm; arc=pass (i=1 spf=pass spfdomain=flex--raychi.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n8-20020a05640206c800b00563f221dfb6si3281913edy.278.2024.02.20.00.12.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:12:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g+nggSxm; arc=pass (i=1 spf=pass spfdomain=flex--raychi.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72517-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EDD771F21EC8 for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 08:12:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A79C65CDE0; Tue, 20 Feb 2024 08:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="g+nggSxm" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90F965C5EC for <linux-kernel@vger.kernel.org>; Tue, 20 Feb 2024 08:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708416739; cv=none; b=YahD4WEHXOp8pvZUTb6wofmwyWGGD27JCiwlM3iT4OYhpNxi9bLi5s3zbeATWGsYWLwjqKkhRnrgUPObxM1AUM/E+MJCYB7mxEvoSUuqTiIZ+teLC8HgnZUzQs5EE1IB1wFccuvCLlp7mX71Q4mtA7dMcFDnrV+q0SUPCH/Tz3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708416739; c=relaxed/simple; bh=/rabM4Ojv3qXPABWhPOzcXvWzcE1bpcBe1707Z9xKgg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=VdD7HBzFQXiw1nQeYsUYd5hboBG7Q/tZTeCn/8oaz+Cm+FngrS/Qo3sJPcKoaE2uULGdeAXQ+UuDgoGY2z9R6/ddgjL7hkkrdYtn7JtLsWOtsAza6QsaxRIOUkisnclnOgQjntvKTwiNujptKKJrkhKMOid4U5dmLVMCzFRF/Vs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--raychi.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=g+nggSxm; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--raychi.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc743cc50a6so6911642276.2 for <linux-kernel@vger.kernel.org>; Tue, 20 Feb 2024 00:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708416736; x=1709021536; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=7NyTQc14Zf/h2SqeLHUekdRb34OTt1i2UvuEmj+OuFE=; b=g+nggSxmQkbCXvjQQMjfd+GJrhqjetnwR3vH3J7tBDV3Mki9t9r4v1QDZnCPz5OK88 kG6dQSYSd73EVxG6bae7vMB7ZAP+fbZanubSs/NaF8qvgLPygjoSgLLS+ZUhO+TC3zy6 lvYQcIoD1oYrhwiyo6s2bNb9OQ8/J7BgLzwxBN/iFSoax/63sS82m6waRJSSYe26oOp0 c6DlUqQYAQEllT78ObvQYJg7nN5+WCor/I4P62AVuztaruIblbXmezvm6tTFkJlwmnzL DKyZW8x2J1vf+gOCdsx8h7krEexg/qz7i0R7bc9C29X9FUOcw8j4Qzg6iR+kmJ0iYi3x JpDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708416736; x=1709021536; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7NyTQc14Zf/h2SqeLHUekdRb34OTt1i2UvuEmj+OuFE=; b=r8uyVOXMfoj1xkbV/1wT9e2IllauyDcXDRlDeotzN7jNqRUpYvtlJxrl6KQDFfk9/J bazAUnvk3gLxYBhUFpPpnIQMuLgNxfkMQULLX6NRd9NH6w8LhUKpIHltxtPd81DBzO4d XZ55GXD1gE0qDEl2Wo3XwUESL6dXmWhaPxiHaK3I2yCWLV35wR0WIO2wqOS6hI45BEHt vC5w4sT7wK6ffjdIXTYedpP0m0jMmYg4IQOMIgANDM7qCmKAsSK2U+LhCgkUV2Bda++b StPA7JFk/EKiLFtd8pLWY/QnKActsMeJDzHZA746+WkKPNM8cOAAOZska3YCUqine1hX Q/BA== X-Forwarded-Encrypted: i=1; AJvYcCWxbrrK3b0RU/DJ8RW7sFVpnXrToKZKpv6dPeUYjhfNAFIBE7X1xk+zncxvsZUpAyvRp8FgEHfZeWH0ZD/R+0ICq5yw1X8w/os6dQjy X-Gm-Message-State: AOJu0YzaWyb+tnyysgIIUTgGIgI2kqM/TB7ZO+lNqevsi79qpTHepICZ ubN3JFb5To68KojppsRawlB/EZidzAqJKt4ZSLdDvis3chXgqKacURC/+/qK6rUA3I6N8+ukTQm ljQ== X-Received: from raychi-p620lin01.ntc.corp.google.com ([2401:fa00:fc:202:d899:e5b8:ba5f:3c9]) (user=raychi job=sendgmr) by 2002:a25:abec:0:b0:dcc:94b7:a7a3 with SMTP id v99-20020a25abec000000b00dcc94b7a7a3mr495450ybi.12.1708416736722; Tue, 20 Feb 2024 00:12:16 -0800 (PST) Date: Tue, 20 Feb 2024 16:12:04 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240220081205.135063-1-raychi@google.com> Subject: [PATCH] usb: dwc3: gadget: remove warning during kernel boot From: Ray Chi <raychi@google.com> To: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org, quic_uaggarwa@quicinc.com Cc: albertccwang@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ray Chi <raychi@google.com>, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791404826764627827 X-GMAIL-MSGID: 1791404826764627827 |
Series |
usb: dwc3: gadget: remove warning during kernel boot
|
|
Commit Message
Ray Chi
Feb. 20, 2024, 8:12 a.m. UTC
The dwc3->gadget_driver is not initialized during the dwc3 probe
process. This leads to a warning when the runtime power management (PM)
attempts to suspend the gadget using dwc3_gadget_suspend().
This patch adds a check to prevent the warning.
Cc: stable@vger.kernel.org
Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend")
Signed-off-by: Ray Chi <raychi@google.com>
---
drivers/usb/dwc3/gadget.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Tue, Feb 20, 2024 at 4:12 PM Ray Chi <raychi@google.com> wrote: > > The dwc3->gadget_driver is not initialized during the dwc3 probe > process. This leads to a warning when the runtime power management (PM) > attempts to suspend the gadget using dwc3_gadget_suspend(). > > This patch adds a check to prevent the warning. > > Cc: stable@vger.kernel.org > Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") > Signed-off-by: Ray Chi <raychi@google.com> > --- > drivers/usb/dwc3/gadget.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 28f49400f3e8..de987cffe1ec 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) > unsigned long flags; > int ret; > > + if (!dwc->gadget_driver) > + return 0; > + > ret = dwc3_gadget_soft_disconnect(dwc); > if (ret) > goto err; > -- > 2.44.0.rc0.258.g7320e95886-goog > Attached the warning message. 02-20 06:01:24.227725 root 86 86 W Call trace: 02-20 06:01:24.227730 root 86 86 W : dwc3_ep0_out_start+0xec/0x22c 02-20 06:01:24.227738 root 86 86 W : dwc3_ep0_stall_and_restart+0xb8/0xd4 02-20 06:01:24.227747 root 86 86 W : dwc3_gadget_soft_disconnect+0x1a8/0x284 02-20 06:01:24.227756 root 86 86 W : dwc3_gadget_suspend+0x18/0xe4 02-20 06:01:24.227764 root 86 86 W : dwc3_suspend_common+0x5c/0x320 02-20 06:01:24.227774 root 86 86 W : dwc3_runtime_suspend+0x30/0x4c 02-20 06:01:24.227783 root 86 86 W : pm_generic_runtime_suspend+0x3c/0x54 02-20 06:01:24.227793 root 86 86 W : __rpm_callback+0xfc/0x76c 02-20 06:01:24.227802 root 86 86 W : rpm_suspend+0x534/0xd78 02-20 06:01:24.227811 root 86 86 W : dwc3_runtime_idle+0xcc/0x104 02-20 06:01:24.227819 root 86 86 W : rpm_idle+0x228/0x4e0 02-20 06:01:24.227827 root 86 86 W : update_autosuspend+0x50/0xb8 02-20 06:01:24.227836 root 86 86 W : __pm_runtime_use_autosuspend+0x50/0x6c
On Tue, Feb 20, 2024 at 04:12:04PM +0800, Ray Chi wrote: > The dwc3->gadget_driver is not initialized during the dwc3 probe > process. This leads to a warning when the runtime power management (PM) > attempts to suspend the gadget using dwc3_gadget_suspend(). What type of warning happens? > This patch adds a check to prevent the warning. > > Cc: stable@vger.kernel.org > Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") > Signed-off-by: Ray Chi <raychi@google.com> > --- > drivers/usb/dwc3/gadget.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 28f49400f3e8..de987cffe1ec 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) > unsigned long flags; > int ret; > > + if (!dwc->gadget_driver) > + return 0; > + This directly reverts part of the commit you say this fixes, are you SURE about this? Why? thanks, greg k-h
On Tue, Feb 20, 2024 at 04:20:50PM +0800, Ray Chi wrote: > On Tue, Feb 20, 2024 at 4:12 PM Ray Chi <raychi@google.com> wrote: > > > > The dwc3->gadget_driver is not initialized during the dwc3 probe > > process. This leads to a warning when the runtime power management (PM) > > attempts to suspend the gadget using dwc3_gadget_suspend(). > > > > This patch adds a check to prevent the warning. > > > > Cc: stable@vger.kernel.org > > Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") > > Signed-off-by: Ray Chi <raychi@google.com> > > --- > > drivers/usb/dwc3/gadget.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > > index 28f49400f3e8..de987cffe1ec 100644 > > --- a/drivers/usb/dwc3/gadget.c > > +++ b/drivers/usb/dwc3/gadget.c > > @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) > > unsigned long flags; > > int ret; > > > > + if (!dwc->gadget_driver) > > + return 0; > > + > > ret = dwc3_gadget_soft_disconnect(dwc); > > if (ret) > > goto err; > > -- > > 2.44.0.rc0.258.g7320e95886-goog > > > > Attached the warning message. > > 02-20 06:01:24.227725 root 86 86 W Call trace: > 02-20 06:01:24.227730 root 86 86 W : > dwc3_ep0_out_start+0xec/0x22c > 02-20 06:01:24.227738 root 86 86 W : > dwc3_ep0_stall_and_restart+0xb8/0xd4 > 02-20 06:01:24.227747 root 86 86 W : > dwc3_gadget_soft_disconnect+0x1a8/0x284 > 02-20 06:01:24.227756 root 86 86 W : > dwc3_gadget_suspend+0x18/0xe4 > 02-20 06:01:24.227764 root 86 86 W : > dwc3_suspend_common+0x5c/0x320 > 02-20 06:01:24.227774 root 86 86 W : > dwc3_runtime_suspend+0x30/0x4c > 02-20 06:01:24.227783 root 86 86 W : > pm_generic_runtime_suspend+0x3c/0x54 > 02-20 06:01:24.227793 root 86 86 W : __rpm_callback+0xfc/0x76c > 02-20 06:01:24.227802 root 86 86 W : rpm_suspend+0x534/0xd78 > 02-20 06:01:24.227811 root 86 86 W : dwc3_runtime_idle+0xcc/0x104 > 02-20 06:01:24.227819 root 86 86 W : rpm_idle+0x228/0x4e0 > 02-20 06:01:24.227827 root 86 86 W : update_autosuspend+0x50/0xb8 > 02-20 06:01:24.227836 root 86 86 W : > __pm_runtime_use_autosuspend+0x50/0x6c That's a kernel warning? Odd wrapping :( Can you clean it up a bit and put it in the changelog? There should be more info before the "Call trace" portion, right? What is causing the warning exactly? thanks, greg k-h
On 2/20/2024 2:04 PM, Greg KH wrote: > On Tue, Feb 20, 2024 at 04:12:04PM +0800, Ray Chi wrote: >> The dwc3->gadget_driver is not initialized during the dwc3 probe >> process. This leads to a warning when the runtime power management (PM) >> attempts to suspend the gadget using dwc3_gadget_suspend(). > > What type of warning happens? > >> This patch adds a check to prevent the warning. >> >> Cc: stable@vger.kernel.org >> Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") >> Signed-off-by: Ray Chi <raychi@google.com> >> --- >> drivers/usb/dwc3/gadget.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >> index 28f49400f3e8..de987cffe1ec 100644 >> --- a/drivers/usb/dwc3/gadget.c >> +++ b/drivers/usb/dwc3/gadget.c >> @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) >> unsigned long flags; >> int ret; >> >> + if (!dwc->gadget_driver) >> + return 0; >> + > > This directly reverts part of the commit you say this fixes, are you > SURE about this? Why? > Hi Ray, Thinh sent a patch recently addressing the issue in soft disconnect. Can you check if it helps: https://lore.kernel.org/all/e3be9b929934e0680a6f4b8f6eb11b18ae9c7e07.1708043922.git.Thinh.Nguyen@synopsys.com/ Regards, Krishna,
Hi Krishna, I verified the Thinh's patch and the warning could be fixed. Thanks for the information. Regards, Ray On Tue, Feb 20, 2024 at 4:40 PM Krishna Kurapati PSSNV <quic_kriskura@quicinc.com> wrote: > > > > On 2/20/2024 2:04 PM, Greg KH wrote: > > On Tue, Feb 20, 2024 at 04:12:04PM +0800, Ray Chi wrote: > >> The dwc3->gadget_driver is not initialized during the dwc3 probe > >> process. This leads to a warning when the runtime power management (PM) > >> attempts to suspend the gadget using dwc3_gadget_suspend(). > > > > What type of warning happens? > > > >> This patch adds a check to prevent the warning. > >> > >> Cc: stable@vger.kernel.org > >> Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") > >> Signed-off-by: Ray Chi <raychi@google.com> > >> --- > >> drivers/usb/dwc3/gadget.c | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > >> index 28f49400f3e8..de987cffe1ec 100644 > >> --- a/drivers/usb/dwc3/gadget.c > >> +++ b/drivers/usb/dwc3/gadget.c > >> @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) > >> unsigned long flags; > >> int ret; > >> > >> + if (!dwc->gadget_driver) > >> + return 0; > >> + > > > > This directly reverts part of the commit you say this fixes, are you > > SURE about this? Why? > > > > Hi Ray, > > Thinh sent a patch recently addressing the issue in soft disconnect. > Can you check if it helps: > > https://lore.kernel.org/all/e3be9b929934e0680a6f4b8f6eb11b18ae9c7e07.1708043922.git.Thinh.Nguyen@synopsys.com/ > > Regards, > Krishna,
On Tue, Feb 20, 2024 at 05:42:56PM +0800, Ray Chi wrote: > Hi Krishna, > > I verified the Thinh's patch and the warning could be > fixed. Thanks for the information. Can you provide a tested-by for that one? And please do not top post :( thanks, greg k-h
On Tue, Feb 20, 2024 at 9:56 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Tue, Feb 20, 2024 at 05:42:56PM +0800, Ray Chi wrote: > > Hi Krishna, > > > > I verified the Thinh's patch and the warning could be > > fixed. Thanks for the information. > > Can you provide a tested-by for that one? Since the solution has been merged, do I still need to provide tested-by? If tested-by is required, should I reply to the email thread for the merged patch or the reported patch? > And please do not top post :( Thanks for the tips and your patience. Regards, Ray
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 28f49400f3e8..de987cffe1ec 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -4708,6 +4708,9 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) unsigned long flags; int ret; + if (!dwc->gadget_driver) + return 0; + ret = dwc3_gadget_soft_disconnect(dwc); if (ret) goto err;