Re: Query on usb/core/devio.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mo, 2018-10-15 at 09:50 -0400, Alan Stern wrote:
> 
> It seems that a better approach would be to have an ioctl which would:
> 
>         fail if there are any active user URBs;
> 
>         drop the usbfs PM reference so the device can suspend;
> 
>         block interruptibly until the device resumes;

Thus we would require user space to have a thread for each device
it wants to allow suspend for.

[..]
> What difference does it make if the URBs are killed by the user instead 
> of the kernel?

We stay within the limits of the timing (as well as we can) and the
case of a failed suspend is much easier to handle.
Else we have an unlimited time between cessation of IO and going
into suspend.

> > And notify user space when the device is resumed. IMHO select()
> > is the syscall designed for that.
> 
> Apart from the difficulties mentioned above.

Yes, I see.

	Regards
		Oliver




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux