Re: [PATCH 9/9] w1: w1_therm: leave the slaves of other families alone

From: Krzysztof Kozlowski

Date: Fri Oct 30 2026 - 09:45:18 EST


On 27/10/2026 17:04, Greg Kroah-Hartman wrote:
> From: Josef Bacik <josef@xxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>

Best regards,
Krzysztof