From bbcfa4729b89339b78a2259d8187016e7f221447 Mon Sep 17 00:00:00 2001 From: stdvar Date: Sun, 11 Apr 2021 00:59:21 -0400 Subject: [PATCH] Workaround SN32 USB code deficiencies for remote wakeup to work --- lib/chibios-contrib | 2 +- tmk_core/protocol/chibios/main.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 4917cb70e127..b7a7f57fb2c8 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 4917cb70e1274936f68ac3de0f0325f8ff32ef99 +Subproject commit b7a7f57fb2c8fd37bb7dc4ccdf625f1b7a3aba60 diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 05d6b5761154..c4344408066f 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -243,7 +243,14 @@ int main(void) { /* Remote wakeup */ if (suspend_wakeup_condition()) { usbWakeupHost(&USB_DRIVER); + //Generally there is no need to restart usb driver + //Change is introduced in https://github.com/qmk/qmk_firmware/pull/10088 + //Restarting driver entails bus disconnet/connect and device reenumeration + //SN32 USB driver currently doesn't have proper handling for usb restart thus comment it for now + //Alternatively it is posible to workaround it via ifndefs +#if !defined(SN32F24xx) restart_usb_driver(&USB_DRIVER); +#endif } } /* Woken up */