[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ca54c865-bc5c-ce8e-4ec1-9a3ac4130fa9@suse.com>
Date: Mon, 1 Aug 2022 11:47:13 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Alexey Klimov <klimov.linux@...il.com>,
Oliver Neukum <oneukum@...e.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
linux-watchdog@...r.kernel.org, wim@...ux-watchdog.org,
Guenter Roeck <linux@...ck-us.net>,
USB list <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
atishp@...osinc.com, atishp@...shpatra.org,
Yury Norov <yury.norov@...il.com>,
Alexey Klimov <aklimov@...hat.com>,
Aaron Tomlin <atomlin@...hat.com>
Subject: Re: [PATCH v5] watchdog: add driver for StreamLabs USB watchdog
device
On 31.07.22 04:34, Alexey Klimov wrote:
> On Tue, Jul 26, 2022 at 8:48 AM Oliver Neukum <oneukum@...e.com> 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
Powered by blists - more mailing lists