linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Thierry Reding <treding@nvidia.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	JC Kuo <jckuo@nvidia.com>, Nicolas Chauvet <kwizart@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH v1] usb: xhci: tegra: Check padctrl interrupt presence in device tree
Date: Thu, 21 Oct 2021 11:20:28 -0400	[thread overview]
Message-ID: <20211021152028.GB1161262@rowland.harvard.edu> (raw)
In-Reply-To: <32694811-8768-8e77-f188-4ed1a1fb93da@gmail.com>

On Thu, Oct 21, 2021 at 06:08:41PM +0300, Dmitry Osipenko wrote:
> 21.10.2021 17:57, Dmitry Osipenko пишет:
> > It might be wrong to disable device_may_wakeup() because it will change
> > the system suspend-resume behaviour, i.e. you won't be able to resume by
> > USB event, see [1].
> > 
> > [1]
> > https://elixir.bootlin.com/linux/v5.15-rc6/source/drivers/usb/host/xhci-tegra.c#L1962
> > 
> > Although, I'm not sure whether this is a correct behaviour to start
> > with. Previously, before the offending commit, device_wakeup was never
> > enabled for tegra-xusb. Commit message doesn't explain why wakeup is now
> > enabled unconditionally, wakeup checks aren't needed at all then. This
> > makes no sense, please check it with JC Kuo.
> 
> Although, wakeup could be disabled via sysfs, so it makes sense. Still
> it's not clear whether it's a correct behaviour to enable wakeup during
> system suspend by default. If it wakes machine from suspend when USB
> device is plugged/unplugged, then it's a wrong behaviour.

It depends on the details of how the device works.  In most cases we do 
want to enable wakeup by default for host controller devices.  The 
reason is simple enough: If some USB device attached to the HC is 
enabled for wakeup and sends a wakeup request, we don't want the request 
to get lost because the HC isn't allowed to forward the request on to 
the CPU.

But we do not want to enable wakeup for root hubs.  In particular, we 
don't want to wake up a suspended system merely because a USB device has 
been plugged or unplugged.

Clearly this arrangement depends on the hardware making a distinction 
between wakeup requests originating from the root hub and those simply 
passing through the HC.

Alan Stern

  reply	other threads:[~2021-10-21 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 11:55 [PATCH v1] usb: xhci: tegra: Check padctrl interrupt presence in device tree Dmitry Osipenko
2021-10-21 14:01 ` Thierry Reding
2021-10-21 14:57   ` Dmitry Osipenko
2021-10-21 15:08     ` Dmitry Osipenko
2021-10-21 15:20       ` Alan Stern [this message]
2021-10-21 17:13         ` Dmitry Osipenko
2021-10-21 17:16           ` Dmitry Osipenko
2021-10-21 19:14             ` Alan Stern
2021-10-21 19:17               ` Dmitry Osipenko
2021-10-26  7:23     ` Dmitry Osipenko
2021-10-21 21:37 ` Michał Mirosław
2021-10-21 21:46   ` Dmitry Osipenko
2021-10-21 22:14     ` Michał Mirosław
2021-10-22  5:58       ` Dmitry Osipenko
2021-10-22  9:29         ` Michał Mirosław
2021-10-22  9:35           ` Dmitry Osipenko

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=20211021152028.GB1161262@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=digetx@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jckuo@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=kwizart@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.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;
as well as URLs for NNTP newsgroup(s).