lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 14 Feb 2024 08:55:52 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Jerry Hoemann <jerry.hoemann@....com>
Cc: wim@...ux-watchdog.org, linux-watchdog@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] watchdog/hpwdt: Support Suspend and Resume

On 2/14/24 08:49, Jerry Hoemann wrote:
> Add call backs to support suspend and resume.
> 
> Signed-off-by: Jerry Hoemann <jerry.hoemann@....com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/watchdog/hpwdt.c | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 138dc8d8ca3d..ae30e394d176 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -378,11 +378,36 @@ static void hpwdt_exit(struct pci_dev *dev)
>   	pci_disable_device(dev);
>   }
>   
> +static int hpwdt_suspend(struct device *dev)
> +{
> +	if (watchdog_active(&hpwdt_dev))
> +		hpwdt_stop();
> +
> +	return 0;
> +}
> +
> +static int hpwdt_resume(struct device *dev)
> +{
> +	if (watchdog_active(&hpwdt_dev))
> +		hpwdt_start(&hpwdt_dev);
> +
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops hpwdt_pm_ops = {
> +	LATE_SYSTEM_SLEEP_PM_OPS(hpwdt_suspend, hpwdt_resume)
> +};
> +
>   static struct pci_driver hpwdt_driver = {
>   	.name = "hpwdt",
>   	.id_table = hpwdt_devices,
>   	.probe = hpwdt_init_one,
>   	.remove = hpwdt_exit,
> +
> +	.driver = {
> +		.name = "hpwdt",
> +		.pm = &hpwdt_pm_ops,
> +	}
>   };
>   
>   MODULE_AUTHOR("Tom Mingarelli");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ