]> git.itanic.dy.fi Git - linux-stable/commit
hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report
authorAleksa Savic <savicaleksa83@gmail.com>
Mon, 7 Aug 2023 17:20:03 +0000 (19:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:11:10 +0000 (16:11 +0200)
commitf1fa6e6f85cb5cbf3f1e78c42c25f3b974584543
tree46eb8397926b0c68c8a9f2cec62364ab201d73e4
parentd8f9a9cfdcd31290cb8b720746458cb110301c68
hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report

commit 56b930dcd88c2adc261410501c402c790980bdb5 upstream.

Add a 200ms delay after sending a ctrl report to Quadro,
Octo, D5 Next and Aquaero to give them enough time to
process the request and save the data to memory. Otherwise,
under heavier userspace loads where multiple sysfs entries
are usually set in quick succession, a new ctrl report could
be requested from the device while it's still processing the
previous one and fail with -EPIPE. The delay is only applied
if two ctrl report operations are near each other in time.

Reported by a user on Github [1] and tested by both of us.

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/issues/82

Fixes: 752b927951ea ("hwmon: (aquacomputer_d5next) Add support for Aquacomputer Octo")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230807172004.456968-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[ removed Aquaero support as it's not in 6.1 ]
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/aquacomputer_d5next.c