On Thu, Oct 05, 2023 at 11:48:05AM +0300, Laurent Pinchart wrote: > On Thu, Oct 05, 2023 at 10:40:10AM +0200, Greg KH wrote: > > On Thu, Oct 05, 2023 at 11:17:16AM +0300, Laurent Pinchart wrote: > > > Hi Michael, > > > > > > Thank you for the patch. > > > > > > On Mon, Sep 11, 2023 at 04:05:28PM +0200, Michael Grzeschik wrote: > > > > Since the uvc-video gadget driver is using the v4l2 interface, > > > > the streamon and streamoff can be triggered at any times. To ensure > > > > that the pump worker will be closed as soon the userspace is > > > > calling streamoff we synchronize the state of the gadget ensuring > > > > the pump worker to bail out. > > > > > > I'm sorry but I really dislike this. Not only does the patch fail to > > > ensure real synchronization, as the uvcg_video_pump() function still > > > runs asynchronously, it messes up the usage of the state field that now > > > tracks the state both from a host point of view (which it was doing so > > > far, updating the state based on callbacks from the UDC), and from a > > > gadget userspace point of view. This lacks clarity and is confusing. > > > Furthermore, the commit message doesn't even explain what issue is being > > > fixed here. > > > > > > Greg, I think this series has been merged too soon :-( > > > > Ok, I'll go revert them now, thanks for the review. > > Or we can wait a day for Michael to reply, in case this can quickly be > fixed on top for v6.7. I'm now reading on the loooon discussion from v1, > and reviewing the other pending patches that try to tackle the same > issue. I'd rather take a patchset that everyone agrees with, reverting was easy and now done. thanks, greg k-h