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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e6af6d7-948f-95f4-7009-92213326b234@maciej.szmigiero.name>
Date:   Sun, 23 Jul 2017 22:13:49 +0200
From:   "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
To:     Guenter Roeck <linux@...ck-us.net>,
        Jean Delvare <jdelvare@...e.com>
Cc:     linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (it87) Reapply probe path chip registers settings
 after resume

On 23.07.2017 22:01, Guenter Roeck wrote:
> On 07/23/2017 09:12 AM, Maciej S. Szmigiero wrote:
>> After a suspend / resume cycle we possibly need to reapply chip registers
>> settings that we had set or fixed in a probe path, since they might have
>> been reset to default values or set incorrectly by a BIOS again.
>>
>> Tested on a Gigabyte M720-US3 board, which requires routing internal VCCH5V
>> to in7 (and had it wrong again on resume from S3).
>>
>> Signed-off-by: Maciej S. Szmigiero <mail@...iej.szmigiero.name>
> 
> I understand the problem, but this looks quite invasive. Can this be solved
> without changing the driver all over the place ?

We need to keep track of Super I/O base address (sioaddr), since we need to
write to IT87_SIO_PINX2_REG register in a resume path.
This register is only writable via a GPIO interface so we can't change it
via Environmental Controller I/O port (that this driver normally uses).

The rest is basically making various internal state initializations in
it87_init_device() conditional on 'resume' parameter, so they don't execute
on resume and also about two dozen lines of actual resume handler.

This patch shouldn't cause any change of behavior in probe path.

> 
> Guenter

Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ