mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Alexey Klimov <klimov.linux@gmail.com>, Oliver Neukum <oneukum@suse.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	linux-watchdog@vger.kernel.org, wim@linux-watchdog.org,
	Guenter Roeck <linux@roeck-us.net>,
	USB list <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	atishp@rivosinc.com, atishp@atishpatra.org,
	Yury Norov <yury.norov@gmail.com>,
	Alexey Klimov <aklimov@redhat.com>,
	Aaron Tomlin <atomlin@redhat.com>
Subject: Re: [PATCH v5] watchdog: add driver for StreamLabs USB watchdog device
Date: Mon, 1 Aug 2022 11:47:13 +0200	[thread overview]
Message-ID: <ca54c865-bc5c-ce8e-4ec1-9a3ac4130fa9@suse.com> (raw)
In-Reply-To: <CALW4P++5ahRdK6WvghPgpPcTuoJyezU_=s6MG2nn4OBRWZYGXQ@mail.gmail.com>



On 31.07.22 04:34, Alexey Klimov wrote:
> On Tue, Jul 26, 2022 at 8:48 AM Oliver Neukum <oneukum@suse.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


  parent reply	other threads:[~2022-08-01  9:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  3:06 Alexey Klimov
2022-07-25  8:51 ` Greg KH
2022-07-25 14:07   ` Guenter Roeck
2022-07-26  0:21   ` Alexey Klimov
2022-07-26  7:48     ` Oliver Neukum
2022-07-31  2:34       ` Alexey Klimov
2022-07-31  8:20         ` Guenter Roeck
2022-07-31 14:17           ` Alan Stern
2022-08-01  4:00             ` Alexey Klimov
2022-08-01  3:06           ` Alexey Klimov
2022-08-01  9:47         ` Oliver Neukum [this message]
2022-07-25 14:02 ` Guenter Roeck
2022-07-26  1:31   ` Alexey Klimov
2022-07-26  3:24     ` Guenter Roeck
2022-08-01  2:58       ` Alexey Klimov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca54c865-bc5c-ce8e-4ec1-9a3ac4130fa9@suse.com \
    --to=oneukum@suse.com \
    --cc=aklimov@redhat.com \
    --cc=atishp@atishpatra.org \
    --cc=atishp@rivosinc.com \
    --cc=atomlin@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=klimov.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@linux-watchdog.org \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®