linux-stable/drivers/iio
Alexander Zangerl 4b01b931ce iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
commit fd39d9668f upstream.

The ms5611 driver falsely rejects lots of MS5607-02BA03-50 chips
with "PROM integrity check failed" because it doesn't accept a prom crc
value of zero as legitimate.

According to the datasheet for this chip (and the manufacturer's
application note about the PROM CRC), none of the possible values for the
CRC are excluded - but the current code in ms5611_prom_is_valid() ends with

return crc_orig != 0x0000 && crc == crc_orig

Discussed with the driver author (Tomasz Duszynski) and he indicated that
at that time (2015) he was dealing with some faulty chip samples which
returned blank data under some circumstances and/or followed example code
which indicated CRC zero being bad.

As far as I can tell this exception should not be applied anymore; We've
got a few hundred custom boards here with this chip where large numbers
of the prom have a legitimate CRC value 0, and do work fine, but which the
current driver code wrongly rejects.

Signed-off-by: Alexander Zangerl <az@breathe-safe.com>
Fixes: c0644160a8 ("iio: pressure: add support for MS5611 pressure and temperature sensor")
Link: https://lore.kernel.org/r/2535-1695168070.831792@Ze3y.dhYT.s3fx
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:13:30 +02:00
..
accel iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 16:26:54 +01:00
adc meson saradc: fix clock divider mask length 2023-08-11 11:33:46 +02:00
amplifiers
buffer
chemical iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. 2020-09-23 10:46:29 +02:00
common iio: cros_ec: Fix the allocation size for cros_ec_command 2023-08-16 18:10:54 +02:00
counter counter: 104-quad-8: Fix race condition between FLAG and CNTR reads 2023-04-26 11:18:58 +02:00
dac iio: dac: mcp4725: Fix i2c_master_send() return value handling 2023-06-09 10:22:52 +02:00
dummy iio: dummy: iio_simple_dummy: check the return value of kstrdup() 2022-06-14 16:53:59 +02:00
frequency
gyro iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up() 2022-07-02 16:18:09 +02:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:16:31 +01:00
humidity iio: humidity: hdc100x: Add margin to the conversion time 2021-08-26 08:37:00 -04:00
imu iio: adis_buffer: do not return ints in irq handlers 2021-07-20 16:17:38 +02:00
light iio: light: rpr0521: add missing Kconfig dependencies 2022-12-08 11:16:31 +01:00
magnetometer iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-12 12:17:05 +02:00
multiplexer
orientation
potentiometer
potentiostat iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-20 16:17:39 +02:00
pressure iio: pressure: ms5611: ms5611_prom_is_valid false negative bug 2023-10-25 11:13:30 +02:00
proximity iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:17:39 +02:00
temperature iio: hid-sensor-temperature: Fix issues of timestamp channel 2021-03-24 11:05:04 +01:00
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-11-25 17:36:53 +01:00
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-29 13:47:10 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: Use min() instead of min_t() to make code more robust 2023-09-23 10:47:05 +02:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-12-08 11:16:30 +01:00
industrialio-trigger.c iio: trigger: Fix reference counting 2021-12-14 10:16:56 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: only release the device node when done with it 2022-10-26 13:17:03 +02:00
Kconfig
Makefile