No description
Find a file
Adam Wujek 9444c59499 hwmon: (pmbus) Check PEC support before reading other registers
[ Upstream commit d1baf7a3a3 ]

Make sure that the support of PEC is determined before the read of other
registers. Otherwise the validation of PEC can trigger an error on the read
of STATUS_BYTE or STATUS_WORD registers.

The problematic scenario is the following. A device with enabled PEC
support is up and running and a kernel driver is loaded.
Then the driver is unloaded (or device unbound), the HW device
is reconfigured externally (e.g. by i2cset) to advertise itself as not
supporting PEC. Without the move of the code, at the second load of
the driver (or bind) the STATUS_BYTE or STATUS_WORD register is always
read with PEC enabled, which is likely to cause a read error resulting
with fail of a driver load (or bind).

Signed-off-by: Adam Wujek <dev_public@wujek.eu>
Link: https://lore.kernel.org/r/20220519233334.438621-1-dev_public@wujek.eu
Fixes: 75d2b2b06b ("hwmon: (pmbus) disable PEC if not enabled")
Fixes: 4e5418f787 ("hwmon: (pmbus_core) Check adapter PEC support")
[groeck: Added Fixes: tags, dropped continuation line]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:57 +02:00
arch x86/sev: Annotate stack change in the #VC handler 2022-06-09 10:25:55 +02:00
block bfq: Allow current waker to defend against a tentative one 2022-06-09 10:25:56 +02:00
certs
crypto crypto: ecrdsa - Fix incorrect use of vli_cmp 2022-06-06 08:47:53 +02:00
Documentation sched/psi: report zeroes for CPU full at the system level 2022-06-09 10:25:41 +02:00
drivers hwmon: (pmbus) Check PEC support before reading other registers 2022-06-09 10:25:57 +02:00
fs ext4: reject the 'commit' option on ext2 filesystems 2022-06-09 10:25:54 +02:00
include net: macb: Fix PTP one step sync support 2022-06-09 10:25:56 +02:00
init kthread: Don't allocate kthread_struct for init and umh 2022-06-09 10:25:16 +02:00
ipc ipc/sem: do not sleep with a spin lock held 2022-02-04 09:25:05 -08:00
kernel dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages 2022-06-09 10:25:50 +02:00
lib kunit: fix debugfs code to use enum kunit_status, not bool 2022-06-09 10:25:46 +02:00
LICENSES
mm zsmalloc: fix races between asynchronous zspage free and page migration 2022-06-06 08:47:53 +02:00
net sctp: read sk->sk_bound_dev_if once in sctp_rcv() 2022-06-09 10:25:53 +02:00
samples samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided 2022-06-09 10:25:48 +02:00
scripts scripts/faddr2line: Fix overlapping text section failures 2022-06-09 10:25:50 +02:00
security lockdown: also lock down previous kgdb use 2022-05-25 09:59:10 +02:00
sound ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv() 2022-06-09 10:25:57 +02:00
tools perf parse-events: Support different format of the topdown event name 2022-06-09 10:25:57 +02:00
usr
virt KVM: Free new dirty bitmap if creating a new memslot fails 2022-05-25 09:59:03 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap MAINTAINERS: Update Jisheng's email address 2022-03-08 17:30:32 +01:00
COPYING
CREDITS MAINTAINERS: replace a Microchip AT91 maintainer 2022-02-09 11:30:01 +01:00
Kbuild
Kconfig
MAINTAINERS net: dsa: realtek-smi: move to subdirectory 2022-04-08 13:58:12 +02:00
Makefile Linux 5.17.13 2022-06-06 08:47:57 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.