On 31.07.22 04:34, Alexey Klimov wrote: > On Tue, Jul 26, 2022 at 8:48 AM Oliver Neukum <oneukum@xxxxxxxx> wrote: > You're right. Upon reset the watchdog is disabled even if it was active before. > Adding empty ->pre_reset() and ->post_reset() helps to avoid that, but > looking at Documentation and other drivers it seems that I need to do: > in pre_reset(): > mutex_lock() to block any other I/O to the usb device; > __usb_streamlabs_wdt_cmd(STOP) to stop the watchdog; > and do not unlock the mutex; > > in post_reset(): > if (watchdog_active()) > __usb_streamlabs_wdt_cmd(START); > mutex_unlock() to allow other's I/O to the usb deivce. > > Seems right? Hi, I suppose if you make reenabling the watchdog conditional, you may just as well do the same for disabling it. Regards Oliver