]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
authorGuenter Roeck <linux@roeck-us.net>
Fri, 5 Apr 2019 15:44:41 +0000 (08:44 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit6e0a9eebd33f12687f1a3f409f9cded6119033e2
tree8d80a1cb7db8db7588502b2e9498a88ed8fefb76
parent302ef683ed47bdce6876f79031316d74c3c22c47
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit e95fd518d05bfc087da6fcdea4900a57cfb083bd ]

Super-IO accesses may fail on a system with no or unmapped LPC bus.

Also, other drivers may attempt to access the LPC bus at the same time,
resulting in undefined behavior.

Use request_muxed_region() to ensure that IO access on the requested
address space is supported, and to ensure that access by multiple drivers
is synchronized.

Fixes: b72656dbc491 ("hwmon: (w83627hf) Stop using globals for I/O port numbers")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hwmon/w83627hf.c