Hi Hans On Mon, 2 Dec 2024 at 12:17, Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Hi All, > > While reviewing Ricardo's "[PATCH v4 0/4] media: uvcvideo: Two fixes for > async controls" series I noticed that uvc_ctrl_commit() stops processing > entities on an error: > > list_for_each_entry(entity, &chain->entities, chain) { > ret = uvc_ctrl_commit_entity(chain->dev, entity, rollback, > &err_ctrl); > if (ret < 0) { > if (ctrls) > ctrls->error_idx = > uvc_ctrl_find_ctrl_idx(entity, ctrls, > err_ctrl); > goto done; > } > } > > This means that if there are further entities with changed ctrls > in the chain, not only do the new ctrl values not get committed > which is expected. But the new values do get kept in the drivers > cached ctrl values. > > I believe that what needs to happen instead is that the loop > over all entities is continued, but for the other entities > uvc_ctrl_commit_entity() needs to be called with rollback = 1 > after the error. > I believe that you are correct. Check out this patchset: https://lore.kernel.org/linux-media/20241210-uvc-data-backup-v1-0-77141e439cc3@xxxxxxxxxxxx/T/#t Regards! > Regards, > > Hans > > > > -- Ricardo Ribalda