From: Hongyu Xie <xy521521@gmail.com>
To: stern@rowland.harvard.edu, xy521521@gmail.com
Cc: gregkh@linuxfoundation.org, oneukum@suse.com, brauner@kernel.org,
jlayton@kernel.org, jack@suse.cz, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, xiehongyu1@kylinos.cn
Subject: Re: [PATCH next] usb: usbfs: Add reset_resume for usbfs
Date: Mon, 15 Jul 2024 09:13:30 +0800 [thread overview]
Message-ID: <b15d0ba0-e133-4df7-8371-a701ec5005fb@kylinos.cn> (raw)
In-Reply-To: <8a16e1c2-fd59-4279-8b36-806a214385b6@rowland.harvard.edu>
From: Hongyu Xie <xiehongyu1@kylinos.cn>
On 2024/7/13 10:22, Alan Stern wrote:
> On Fri, Jul 12, 2024 at 11:10:57AM +0800, Hongyu Xie wrote:
>> From: Hongyu Xie <xiehongyu1@kylinos.cn>
>>
>>
>>
>> On 2024/7/11 16:59, Oliver Neukum wrote:
>>>
>>>
>>> On 11.07.24 10:43, Hongyu Xie wrote:
>>>> During hibernation, usb_resume_interface will set needs_binding to 1 if
>>>> the usb_driver has no reset_resume implimentation. The USB interface
>>>> will be rebind after usb_resume_complete.
>>>>
>>>> Normally, that's fine. But if a USB interface has a matched kernel
>>>> driver, and a userspace driver or application is using this USB
>>>> interface through usbfs during hibernation, usbfs will be
>>>> detatched with the USB interface after resume. And this USB interface
>>>> will be bind with a kernel driver instead of usbfs.
>>>>
>>>> So add reset_resume to fix this.
>>>
>>> The device has lost all settings, yet we continue like nothing
>>> changed. That strikes me as a very bad idea. If a device has undergone
>>> a reset user space has not requested, we need to return an error upon
>>> the next interaction.
>> Sorry I don't understand your concern.
>> When will "a reset user space has not requested" happen if there is a
>> reset_resume in usbfs?
>
> That's what a reset-resume is: a reset that occurs when the device is
> resumed, rather than when the driver has requested a reset.
Right now this reset_resume did nothing, it's just an empty function to
prevent rebind after resume.
Maybe I should filter out usbfs in usb_resume_interface when setting
needs_binding to 1?
>
> Alan Stern
>
>>> I am sorry, but this implementation has some fundamental issues.
>>>
>>> Regards
>>> Oliver
>>>
>> Regards
>> Hongyu Xie
next prev parent reply other threads:[~2024-07-15 1:13 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
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 [this message]
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=b15d0ba0-e133-4df7-8371-a701ec5005fb@kylinos.cn \
--to=xy521521@gmail.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=oneukum@suse.com \
--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®