From: Greg Kroah-Hartman Date: Wed, 15 Jan 2025 10:32:17 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.1.125~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93fe3d50b96310602757021668aa6cfa46567c4f;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch --- diff --git a/queue-6.6/iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch b/queue-6.6/iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch new file mode 100644 index 0000000000..525599a2f9 --- /dev/null +++ b/queue-6.6/iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch @@ -0,0 +1,56 @@ +From 65a60a590142c54a3f3be11ff162db2d5b0e1e06 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Maneyrol +Date: Wed, 13 Nov 2024 21:25:45 +0100 +Subject: iio: imu: inv_icm42600: fix timestamps after suspend if sensor is on + +From: Jean-Baptiste Maneyrol + +commit 65a60a590142c54a3f3be11ff162db2d5b0e1e06 upstream. + +Currently suspending while sensors are one will result in timestamping +continuing without gap at resume. It can work with monotonic clock but +not with other clocks. Fix that by resetting timestamping. + +Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping") +Cc: stable@vger.kernel.org +Signed-off-by: Jean-Baptiste Maneyrol +Link: https://patch.msgid.link/20241113-inv_icm42600-fix-timestamps-after-suspend-v1-1-dfc77c394173@tdk.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c ++++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +@@ -17,6 +17,7 @@ + #include + + #include ++#include + + #include "inv_icm42600.h" + #include "inv_icm42600_buffer.h" +@@ -725,6 +726,8 @@ out_unlock: + static int inv_icm42600_resume(struct device *dev) + { + struct inv_icm42600_state *st = dev_get_drvdata(dev); ++ struct inv_sensors_timestamp *gyro_ts = iio_priv(st->indio_gyro); ++ struct inv_sensors_timestamp *accel_ts = iio_priv(st->indio_accel); + int ret; + + mutex_lock(&st->lock); +@@ -745,9 +748,12 @@ static int inv_icm42600_resume(struct de + goto out_unlock; + + /* restore FIFO data streaming */ +- if (st->fifo.on) ++ if (st->fifo.on) { ++ inv_sensors_timestamp_reset(gyro_ts); ++ inv_sensors_timestamp_reset(accel_ts); + ret = regmap_write(st->map, INV_ICM42600_REG_FIFO_CONFIG, + INV_ICM42600_FIFO_CONFIG_STREAM); ++ } + + out_unlock: + mutex_unlock(&st->lock); diff --git a/queue-6.6/series b/queue-6.6/series index 12e0a1d543..bac762573b 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -38,6 +38,7 @@ tcp-annotate-data-race-around-sk-sk_mark-in-tcp_v4_s.patch riscv-fix-early-ftrace-nop-patching.patch memblock-tests-fix-implicit-declaration-of-function-numa_valid_node.patch x86-mm-numa-use-numa_no_node-when-calling-memblock_set_node.patch +iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch netfilter-nf_tables-imbalance-in-flowtable-binding.patch netfilter-conntrack-clamp-maximum-hashtable-size-to-.patch sched-sch_cake-add-bounds-checks-to-host-bulk-flow-f.patch