From: Alan Stern <stern@rowland.harvard.edu>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: mathias.nyman@intel.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci: Disable connect, disconnect and over-current wakeup on system suspend
Date: Thu, 17 Aug 2023 23:19:08 -0400 [thread overview]
Message-ID: <dc4f5de7-43f1-4dc2-9a2f-39846b4b7cc3@rowland.harvard.edu> (raw)
In-Reply-To: <CAAd53p7HZk5tTvT=dhSk01KSW4W3vCi+hY8aFYRoFzxs8YiiYA@mail.gmail.com>
On Fri, Aug 18, 2023 at 08:00:39AM +0800, Kai-Heng Feng wrote:
> On Thu, Aug 17, 2023 at 10:07 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> >
> > On Thu, Aug 17, 2023 at 05:33:05PM +0800, Kai-Heng Feng wrote:
> > > The system is designed to let display and touchpanel share the same
> > > power source, so when the display becomes off, the USB touchpanel also
> > > lost its power and disconnect itself from USB bus. That doesn't play
> > > well when most Desktop Environment lock and turnoff the display right
> > > before entering system suspend.
> >
> > I don't see why that should cause any trouble. The display gets locked
> > and turned off, the touchpanel disconnects from the USB bus, and then
> > the system goes into suspend. Why would there be a wakeup signal at
> > this point?
>
> The disconnecting can happens during the system suspend process, so
> the suspend process is aborted.
Maybe these systems need to add a little delay when the display is
turned off, in order to give the touchpanel time to disconnect before
the system suspend begins.
> > > So for system-wide suspend, also disable connect, disconnect and
> > > over-current wakeup to prevent spurious wakeup.
> >
> > Whether to disable these things is part of the userspace policy. The
> > kernel should not make the decision; the user does by enabling or
> > disabling wakeups.
>
> The power/wakeup is already disabled.
In that case the root hub should not generate a wakeup request in
response to the touchpanel disconnecting.
> The disconnecting event is from roothub and if roothub wakeup is
> disabled, other USB devices lose the ability to wake the system up
> from system suspend.
That shouldn't happen either. Disabling wakeup on the root hub should
not prevent the root hub from relaying wakeup requests it receives from
downstream devices. It should merely prevent the root hub from
generating its own wakeup requests for connects, disconnects, and
over-current events.
It sounds like the xhci root-hub code isn't doing the right thing, at
least, not on your systems.
Alan Stern
next prev parent reply other threads:[~2023-08-18 3:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 9:33 Kai-Heng Feng
2023-08-17 11:18 ` Oliver Neukum
2023-08-17 12:53 ` Mathias Nyman
2023-08-17 13:13 ` Kai-Heng Feng
2023-08-17 14:03 ` Alan Stern
2023-08-17 23:49 ` Kai-Heng Feng
2023-08-17 14:07 ` Alan Stern
2023-08-17 14:22 ` Alan Stern
2023-08-18 0:01 ` Kai-Heng Feng
2023-08-18 3:08 ` Alan Stern
2023-08-18 14:12 ` Kai-Heng Feng
2023-08-18 15:02 ` Alan Stern
2023-08-18 0:00 ` Kai-Heng Feng
2023-08-18 3:19 ` Alan Stern [this message]
2023-08-18 14:19 ` Kai-Heng Feng
2023-08-18 15:20 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc4f5de7-43f1-4dc2-9a2f-39846b4b7cc3@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=gregkh@linuxfoundation.org \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®