From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>, Oliver Neukum <oneukum@suse.com>
Cc: Hongyu Xie <xiehongyu1@kylinos.cn>,
gregkh@linuxfoundation.org, brauner@kernel.org,
jlayton@kernel.org, jack@suse.cz, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH next] usb: usbfs: Add reset_resume for usbfs
Date: Tue, 16 Jul 2024 14:44:50 +0200 [thread overview]
Message-ID: <3073c8ce-1923-4816-a442-41b4cc333af9@suse.com> (raw)
In-Reply-To: <429eb27a-578a-4208-8ce1-89434b8d739f@rowland.harvard.edu>
On 15.07.24 16:22, Alan Stern wrote:
> On Mon, Jul 15, 2024 at 10:53:14AM +0200, Oliver Neukum wrote:
>>
>>
>> On 11.07.24 16:41, Alan Stern wrote:
>>> Agreed, but the solution is pretty simple. Because the device was
>>> suspended, the userspace driver must have enabled suspend via the
>>> USBDEVFS_ALLOW_SUSPEND ioctl.
>>
>> The whole system could have been suspended, in particularly to S4.
>
> You are right. I was thinking of runtime suspend, not system suspend.
> My mistake.
This is at the intersection of several scenarios. That is a good part of
what makes this difficult.
In principal I think we could get away with checking for a flag to be set
at reset_resume() before each operation. Elegant this is not. Yet, it seems
to me like the race necessarily exists and is unsolvable in user space.
Furthermore in the long run, if we want to use D3cold in runtime power
management, it looks to me like we would want a second permission ioctl
for that.
Regards
Oliver
next prev parent reply other threads:[~2024-07-16 12:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 8:43 Hongyu Xie
2024-07-11 8:59 ` Oliver Neukum
2024-07-11 14:41 ` Alan Stern
2024-07-15 8:53 ` Oliver Neukum
2024-07-15 14:22 ` Alan Stern
2024-07-16 12:44 ` Oliver Neukum [this message]
2024-07-17 1:43 ` Hongyu Xie
2024-07-17 2:05 ` Alan Stern
2024-07-17 3:13 ` Hongyu Xie
2024-07-17 7:52 ` Oliver Neukum
2024-07-17 13:44 ` Alan Stern
2024-07-17 15:27 ` Oliver Neukum
2024-07-17 7:42 ` Oliver Neukum
2024-07-18 3:23 ` Hongyu Xie
2024-07-12 3:10 ` Hongyu Xie
2024-07-13 2:22 ` Alan Stern
2024-07-15 1:13 ` Hongyu Xie
2024-07-15 8:40 ` Oliver Neukum
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=3073c8ce-1923-4816-a442-41b4cc333af9@suse.com \
--to=oneukum@suse.com \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=xiehongyu1@kylinos.cn \
/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®