From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796530964; b=G7fA9BV7mK68YQsHHGX0GMa6ClYcpXQGuENZwKFO2PoCSPEJxh9mEsvWB7CdtdJ+hBV0 oC34veCb440dOvqXZygvmaRe17vw6aoP8UBiFs0JgT+8orXRr44fdIdQPfaZJSBplmt30 +nhvKH/yi+ilACS0C4oROiEaXmE9OkWi3jTktQ75pvcYqTSc+Bhuv+CiZxXGqxWTKSINS yUSzeU4S6HGFN/zx3ZcceYqnzHDhaHRZyz8Vn104JxSdA7HxRIvH5H7ngdPGjbq9jFgIy fqVhZBRiP7zCzGDxpfy0xhKm6GIBofLXzb8bVOwqWbjOiRCMlSAk2tONNiGEC8RtufA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796530964; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=NsEFRpRJ4Q+4eeePV8WgUomX6e+0bl8Ongbu9Gh090M=; b=1eO1xUg0wffFo8Yljb4UtRLVQyBCP99x6YxmUMZR7VG54SZwCgvk5dLaRmqaHIAnOTeX DWakJgBW/KJghx4ApdonJcbpGmflXl4DfBTXcpUwGv6jZnoadfY4V+Q4+uEdJqHJ+kU/5 2lMrAVWmG+sgAF8GcxcOMwP/lnLkP7liJYHEDdm4bed4nS3KHAmJM7UPiYvt9ZQaUl9lL XgdOvYphW7hQRzBBGCQ4dZsjacivWsKzTJOA2+PMhwaePjHl/p1u0yuZ1TEXnc4mLuR5k QPsU/7ojFv9ukA6HQwWZPC6jBGpkkXAPHA1BTVMSv+v7sUwjY/hnGMVwCWJ2qthbF9g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hzBEM9rQ; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b="CvP4S5d/"; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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.subspace.kernel.org (Postfix) with ESMTPS id 71FE0606A31F for ; Sun, 6 Dec 2026 04:22:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 71FE0606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hzBEM9rQ; dkim=pass (2048-bit key, unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=CvP4S5d/ Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B63QEiZ1815990 for ; Sun, 6 Dec 2026 04:22:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=NsEFRpRJ4Q+4eeePV8WgUomX 6e+0bl8Ongbu9Gh090M=; b=hzBEM9rQHQY7R7KftxGjLwrvAYKrOO5807FNijf0 MwWNSKmNbEZfQN9WH4SeE1aBsrVvHG9LgGLnSOWMaf6PET0LhiL2qjFS10PITWFH maM+sfgjaKeU0OJmqYR2z0kFvRoJEY0jue89zCV9M42Ck87uxJpg6shPsp4aHhwJ P8VdJonM9HKbs2mo2pw9/JtEOpPbv0toY2uJgOIwSyshWDd8Lxj8F5pyUlgM0Fe/ GsCwv5w1nhkXl7Hl4hPhqCjTc0aqpl/S40vQZ/blqbsh3yZtP8hwZzMUQI5IwrIi 8a1m7ub1g6a1nGeYkuwwIPkvBybC9WhmRvWshYRn/+XE/g== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jcbshjrhn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 06 Dec 2026 04:22:43 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-30bcb065bfdso3020703eec.0 for ; Sat, 05 Dec 2026 20:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796530963; x=1797135763; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=NsEFRpRJ4Q+4eeePV8WgUomX6e+0bl8Ongbu9Gh090M=; b=CvP4S5d/b8WADkNv4Tk5Qxo/DBzZTTNV7pDhZlKRrkWb+QMd9BGBtmaM0711xCJofv t83PG87mHolOXIBkfrMkMfLqQCkNEIapffVuDwWuZiExRJq67UfT7H94j5E94u6dyaMZ LRorsgwpntqcWMB9M2UF/BCyVMUmmYQNP68attkcYMdZsCdZ/FUFfo0Rbax9Ryrqgf6H aMBK2S+mnwuFNqV7K78RqdLWcNoAyGfNmSdmZ1SWhfUAwBBDMCok9CubexLZ33ZOQhCc 4Ssm2ZW/EFSKDH9P6PWBYBXHNnKjVwv8rKw3KxZbYoMsXqWkTEYr0mH91Cv0l1JM2fz+ tlOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796530963; x=1797135763; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NsEFRpRJ4Q+4eeePV8WgUomX6e+0bl8Ongbu9Gh090M=; b=J60MI21c0IjFpqLFqYbvTqb9rizNYgTj/OwtCxKzLEgIdQirBhKtjh4dP5N79XBQ9X Ezf+3MNE/HIPD78ZFXd6n29wmXRJw2D4P6xX5dhdRNFYBojqTug1UhUGBFQ85j0PGX72 RC5hCYsl0aCaxgeawLlHgRr/Nf7M2i4qmIUquuolS8+fu6gp5SDYNND78mWlgv+wJVtq //Y0+Dao08n/M4uWka5Qf8+moerKTDHegTDdHOMfeLI+f7aa+Wa5Vpih8CWL9cwCrCH4 TzRedVJZGVDOwpqahlkH8K6ZWxpoETgHUxGXHtX8VMJgdGerKSYRx6Utt9o9YVkRRhHt UFxw== X-Forwarded-Encrypted: i=1; AL+hErGSIaUzAFs8frd+7GrVAdAYndN1egniIb1AmvXDFnTw+j12nTLwJXBLJzydgYVXq9BlVQa2CT+jKnk8Lxo=@vger.kernel.org X-Gm-Message-State: AB4q+uGmsBPIUp16CnAh/eLntwGi+hCExESx72NdP9AXuu+VajiV90Dl L3Q5W0S+cmNDFKsrhgDswv4NFQRfYcGGyGW4/KhUc1hVco/KqUkbBYLPh452kB3fwAnDwCe/fuZ 2+bcImrm2/p9wUAcl6Qh1zSPPSNKXK3S7UGILtLt53a0lhVJWEupvpayxNGSY31kNJsY= X-Gm-Gg: AZFdTZewZsoyvSXbrAJ9z0r6e0D/mnuDQtIIxqlV3C+/03KxeTzgDS0whub1CDRFGke Aw1nBgbh52N67LMuUJuKKgIoJDUjxsg+1XYqJr8m6foyr15FA07+9eRUZJXIpOuxedk6qA878M+ XoBv3vq1N2nhccbx/R5PDER13JJQN8UW/PBUI6EqF51Gpn6DpNY0qI9RE8bZJdM93fLwGe1pXx2 kApndocGujFniNwnSvhGUbBO7LnNSOc15mcKoiBgJItHryHCk4kwMPYvyv6JsQ5px24eGnePr90 v66RvjwJ3hsgOs1NOnL6cfJfsDHKFuPijVI5xhxj9gULic+H5cqdm31oeDj0tfbe765n0+pdQlT PXfoWyuRKVB19JoHrqZJMnQTG56W1g/HhbUjpYuSNoJDmoqouecyn7McTRjv3hX/DaHgKAzub5D AyOxc/bKE5X2KF98rF1tBm X-Received: by 2002:a05:7300:430b:b0:386:b7d0:adb3 with SMTP id 5a478bee46e88-387521e1bcemr9373024eec.30.1796530962717; Sat, 05 Dec 2026 20:22:42 -0800 (PST) X-Received: by 2002:a05:7300:430b:b0:386:b7d0:adb3 with SMTP id 5a478bee46e88-387521e1bcemr9372985eec.30.1796530962161; Sat, 05 Dec 2026 20:22:42 -0800 (PST) Received: from hu-petche-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3875218bc9fsm24545576eec.6.2026.12.05.20.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 20:22:41 -0800 (PST) Date: Sat, 5 Dec 2026 20:22:39 -0800 From: Peter Chen To: Thinh Nguyen Cc: Bjorn Andersson , Greg Kroah-Hartman , Johan Hovold , Konrad Dybcio , Dmitry Baryshkov , Wesley Cheng , Udipto Goswami , Jack Pham , Pratham Pratap , Krishna Kurapati , Prashanth K , Elson Serrao , "cros-qcom-dts-watchers@chromium.org" , "linux-arm-msm@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/1] usb: dwc3: qcom: Keep wakeup option default off Message-ID: References: <20261110092157.2989350-1-peter.chen@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA2MDAxNSBTYWx0ZWRfXwF9Xb15QpOf8 kkTw+rUviP7TbahtOXISCPlxHP8o41Bg9l6FRi+USSJK2Chk4yA+zDrSqXO6zoMjxW4mfB/78vT qbmEtk9pNeFIVtZeGfvF2LIKxt6tSwI= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA2MDAxNSBTYWx0ZWRfX2WOe0kOOiZKp zoaWw7glIvUacoNgkhATbHmIhCqhkFrK/1jyuwWbYJ+NR2pyq8rpEIQMmYZiHqXkC1wEjhIAssu E+R9KtYF3VbRv7PxoeyM4pw7DGhM+GrLpL5Bnqs2XQHx+GTExYKvOtJdUGN80Adxya3kfpdZ77X Ukwjyg2XfpIbIip83FxLVKVJD5XcY67kZ1n/HRFG1QrkDQ+B3EsEEBu6VdDiqOVUGfdfMd//lQ0 IYS9Xqklavc1sdrUxvCExssCoBtLb+lcEKKiM3ofhdr3zwqHdskEnaTbTIxZAEeZNV560oq9lLP IDOhvaLPY42zETqYnrHsvnu2SmKJGa7gNeL8QW1oy7QDDzHk2bvu8wvxUuKkVg73xx5yOKYBBnJ lErvEHNFj4U/E+loEifqItT0XqOjTk8DckGeXDX/syCjEfEjBAcSOYfaU2C8HhTX5l6Xt3TYjLs GQCO7ZAbek8j3CQISAA== X-Authority-Analysis: v=2.4 cv=ONiyTiaB c=1 sm=1 tr=0 ts=6b14e313 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=kj9zAlcOel0A:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=OCQ_-0m32_B1aKyM6iYA:9 a=CjuIK1q_8ugA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: 2xN_YzlIcjjQlxSnV_hEylJJLKqPWySW X-Proofpoint-GUID: 2xN_YzlIcjjQlxSnV_hEylJJLKqPWySW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-06_01,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2612040000 definitions=main-2612060015 On 26-12-04 03:12:35, Thinh Nguyen wrote: > > > > If both wakeup capability and wakeup option are decided by glue layer, > > there is no reason dwc->sys_wakeup existed for dwc3 core, and there is > > no glue layer user for that. But there are behaviour changes, I am not > > sure if there is a regression. > > We should keep sys_wakeup. It tracks the platform default setting at > probe, which the gadget start/stop needs. The pm_prepare() change only > affects xhci in host mode. > First, whether the USB is as system wakeup source may be decided by user at runtime, assume there is a system option at user menu for wakeup setting, the user could change it at any time, the default setting is not the final setting, do we align this? If the sys_wakeup tracks default wakeup setting: - At device mode, if the default wakeup option is off, the wakeup option can't control it at gadget start/stop, the wakeup option will be totally decided by user option (/sys/../power/wakeup), could you accept this? - At host mode, the user decides runtime wakeup setting and we don't need to block any wakeup setting at code, and xhci follows dwc3 core's setting at pm_prepare(), the sys_wakeup isn't needed, do you agree? > > > > - At host mode: anything the user writes to xhci's own power/wakeup is > > overwritten at every prepare. Before, it could be set independently of the parent. > > That's intended. The controller's power/wakeup is the one that we should > check. The xhci platform device is recreated on role switch, so the > value written to it doesn't persist anyway. Agree, although there could be pre_suspend script do that too. > > > > - At device mode, current wakeup option depends on whether gadget start/stop > > or without binding gadget driver. If delete dwc->sys_wakeup, it > > totally depends on glue layer. For commit f9aa41130ac6 ("usb: dwc3: Properly set > > system wakeup"), it describes a bug of enabling wakeup when gadget driver > > is not bound, it seems some other places enable wakeup option, and read dwc3 wakeup > > option, do some settings later. So, I am afraid there may be regression > > for platforms which set wakeup option default on and rely on dwc3 gadget driver > > disable it. > > It's not affected if we keep sys_wakeup. For qcom, device_init_wakeup() > should be moved before dwc3_core_probe() so sys_wakeup matches the > glue's setting. > Yes, if wakeup option is default on, the device mode driver sets wakeup option at gadget start/stop and without bound gadget driver situations correctly. -- Thanks, Peter Chen