From 8ceb052b123a42eeab6513803422c0a6257c01b8 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 4 Dec 2023 22:21:18 +0200 Subject: make it more unlikely to fill up USB buffer --- src/hid-tmff2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/hid-tmff2.c b/src/hid-tmff2.c index 013039f..ee4232a 100644 --- a/src/hid-tmff2.c +++ b/src/hid-tmff2.c @@ -359,6 +359,9 @@ static void tmff2_work_handler(struct work_struct *w) max_count = state->count; spin_unlock(&tmff2->lock); + /* wait for each effect update to actually be sent out to avoid + * filling up usb output queue */ + hid_hw_wait(tmff2->hdev); } if (max_count && tmff2->allow_scheduling) -- cgit v1.3