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 7462BC2FC14 for ; Thu, 17 Aug 2023 14:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351653AbjHQODl (ORCPT ); Thu, 17 Aug 2023 10:03:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351682AbjHQOD2 (ORCPT ); Thu, 17 Aug 2023 10:03:28 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 8F4E030DE for ; Thu, 17 Aug 2023 07:03:19 -0700 (PDT) Received: (qmail 475129 invoked by uid 1000); 17 Aug 2023 10:03:18 -0400 Date: Thu, 17 Aug 2023 10:03:18 -0400 From: Alan Stern To: Kai-Heng Feng Cc: Mathias Nyman , Oliver Neukum , mathias.nyman@intel.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xhci: Disable connect, disconnect and over-current wakeup on system suspend Message-ID: References: <20230817093305.212821-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 17, 2023 at 09:13:55PM +0800, Kai-Heng Feng wrote: > On Thu, Aug 17, 2023 at 8:52 PM Mathias Nyman > wrote: > > > > On 17.8.2023 14.18, Oliver Neukum wrote: > > > On 17.08.23 11:33, Kai-Heng Feng wrote: > > > > > > Hi, > > > > > >> So for system-wide suspend, also disable connect, disconnect and > > >> over-current wakeup to prevent spurious wakeup. > > > > > > isn't this breaking the ability to effectively use your root hub > > > as a source of system wakeups? That is, even if you want the > > > system to wake up if somebody attaches a new device, it no longer works? > > > > > > > I got the same concern about this. > > Per my test, it doesn't work with or without this change. This applies > to disconnection too, disconnecting USB devices doesn't wake the > system up. > Furthermore, if the newly attached device is a USB keyboard, pressing > it doesn't wake the system up either. Probably because remote wakeup > isn't configured when the system is suspended. If remote wakeup isn't enabled then the do_wakeup variable will be 0, so your patch wouldn't make any difference. The question is what happens when remote wakeup _is_ enabled. Did you check the settings in the controller's and root hub's power/wakeup sysfs files? Alan Stern