From a34e6498f0f606210ed56d5ad53f00602c52be40 Mon Sep 17 00:00:00 2001 From: kimi Date: Sat, 15 Aug 2020 08:47:00 -0400 Subject: fix for kernel panic when initializing T300RS on some setups --- hid-tminit.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'hid-tminit.h') diff --git a/hid-tminit.h b/hid-tminit.h index 820ca86..c8b664e 100644 --- a/hid-tminit.h +++ b/hid-tminit.h @@ -1,3 +1,20 @@ +/** + * These interrupts are used to prevent a nasty crash when initializing the + * T300RS. Used in tminit_interrupts(). + */ +u8 setup_0[] = { 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +u8 setup_1[] = { 0x0a, 0x04, 0x90, 0x03, 0x00, 0x00, 0x00, 0x00 }; +u8 setup_2[] = { 0x0a, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00 }; +u8 setup_3[] = { 0x0a, 0x04, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00 }; +u8 setup_4[] = { 0x0a, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00 }; +u8 *setup_arr[] = { setup_0, setup_1, setup_2, setup_3, setup_4 }; +unsigned int setup_arr_sizes[] = { + ARRAY_SIZE(setup_0), + ARRAY_SIZE(setup_1), + ARRAY_SIZE(setup_2), + ARRAY_SIZE(setup_3), + ARRAY_SIZE(setup_4) +}; /** * This struct contains for each type of * Thrustmaster wheel -- cgit v1.3