Re: [PATCH RFT] i2c: i801: Scan for Dell accelerometer i2c address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03.05.2024 16:39, Pali Rohár wrote:
> On Friday 03 May 2024 16:09:03 Heiner Kallweit wrote:
>> So far each new Dell device with an accelerometer requires a patch.
>> All devices, with one older system as an exception, use address 0x29.
>> So I think we can safely scan for the correct address
> 
> This is too risky. Poking random smbus address can lead to the lockup or
> crash of the whole system. I really dislike such change which is going
> to unconditionally on every system to scan or access fixed smbus address.
> Crashing kernel on some new model in future or on some older models is
> the worst user experience which can happen.
> 
The scan is protected by is_dell_system_with_lis3lv02d().
So we know it's a Dell system with an accelerometer.
The only potentially problematic scenario would be:
- It's a Dell system with an accelerometer  and
- Accelerometer is at an address different from 0x29  and
- System has some other device at address 0x29

If there ever should be such a case, we still would have the option to
provide a more specific probe function to i2c_new_scanned_device().
At least for now I don't really see a risk.

> The hardcoded table with model name and address is the safest option to
> prevent crashes or other unexpected behavior.
> 
> Instead, I would suggest to contact Dell if they can provide a way to
> read accelerometer's i2c/smbus address from ACPI/WMI/DMI. And if there

See comment in the driver:
"Accelerometer's I2C address is not specified in DMI nor ACPI"

> is not any way right now then ask Dell to include it for new products.
> So we can avoid having hardcoded table for new products released in
> future.

This is a good point. Not sure whether anybody tried this yet.
Therefore +Dell.Client.Kernel@xxxxxxxx





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux