On Mon, Dec 01, 2025 at 09:20, Petr Benes <[email protected]> wrote: >>> >>> Which are held in (struct ci_drv).ep[] and the problematic code is >>> ci_udc specific. >> >> Ok. >> >> I have compared the changes with the linux driver >> (drivers/usb/chipidea/udc.c) and see a couple of differences in error >> handling >> >> For example, in linux, in ep_disable(), we return -EBUSY instead of 0. >> >> 0 seems to tell the caller that we sucesfully disabled an ep but we did >> not do anything since it was already disabled. > > Fair.> >> Can we do the same error handling as in the linux driver ? > > Sure. -EBUSY seems to used mainly by *_register_driver(), I'll test it > and return with the updated patch.>
Thank you. Please also make sure to look at ep_enable() in linux as a similar pattern is found in this U-Boot patch. (we return 0 instead of a negative error code) >>> >>>> >>>>> >>>>> Moreover, the patch gets rid of possible outstanding requests if the >>>>> endpoint's state changes to disabled. >>>>> >>>>> Signed-off-by: Petr Beneš <[email protected]> >>>>> Signed-off-by: Michal Vokáč <[email protected]> >>>>> ---

