diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-27 17:04:42 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-11-04 14:12:18 +0100 |
| commit | c0eadd2e06e52563cae2b80491e56eb9712eb727 (patch) | |
| tree | 34da5f8289a57e03418f0da1a09eacf36c40c4d0 /kernel/debug | |
| parent | 1e46334d38e0217f5d255dc6fd63243593052f8e (diff) | |
w1: w1_therm: leave the slaves of other families alone
The file therm_bulk_read belongs to the bus master. Its callbacks walk
all the slaves of the bus and look at sl->family_data as if every slave
were a temperature sensor. A 1-wire bus can carry other devices too:
- The family data of a slave which is driven by another driver, such as
w1_ds2433, w1_ds250x, w1_ds28e04 or w1_ds28e17, is a structure of that
driver. bulk_read_support() takes whatever is at the offset of
specific_functions for a pointer and dereferences it, and if the
result happens not to be 0, the callbacks write the state of the
conversion into that foreign structure.
- For a slave without family data, which is the case for most of the
other drivers and for the default family, trigger_bulk_read() gives up
with -ENODEV. A single serial number chip on the bus is enough to
make the bulk read unusable for all the sensors.
Only look at the slaves whose family is one of ours. A bulk conversion
now works on a bus with other devices.
Fixes: 57c76221d5af ("w1_therm: adding bulk read support to trigger multiple conversion on bus")
Cc: stable <stable@kernel.org>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20261027-llm-char-misc-w1-v1-9-d2e6bfafb6a4@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions
