Re: [RFC PATCH] USB: enable "power/wakeup" to control remote wakeup in the runtime suspend

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

 



On Wednesday 18 July 2012 11:42:50 Alan Stern wrote:
> On Wed, 18 Jul 2012, Oliver Neukum wrote:
> 
> > On Wednesday 18 July 2012 10:54:20 Alan Stern wrote:
> > > On Wed, 18 Jul 2012, Lan Tianyu wrote:
> > > 
> > > > On 2012/7/18 22:19, Alan Stern wrote:
> > > > > An alternative to her suggestion would be to disconnect the device when
> > > > > the port goes off.  When the port is powered back on, the device will
> > > > > be rediscovered and probed again.
> > > > hi alan:
> > > > 	Reprobe may cause the devnum change. Userspace will treat it a
> > > > different device from previous one. e.g app held the device node fd,
> > > > After port went off and on, device reprobed and the fd became invalid.
> > > 
> > > That's right.  Your argument suggests that power-off should be 
> > > controlled by userspace, not by the kernel, and it should happen only 
> > > when no app is holding the device node open.
> > 
> > That is a race. And it is basically unsolvable in user space if the device
> > is available to everybody.
> 
> Everything userspace does is a race.

Therefore some things should be done in kernel space ;-)

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux