From 801ebd3543bd40b8e1dcc0098a9bea35320c0059 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Mon, 11 Jul 2022 22:13:13 +0300 Subject: [PATCH] bdk: xusb: fully clear device mode ctrl register on deinit --- bdk/usb/xusbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdk/usb/xusbd.c b/bdk/usb/xusbd.c index 3ebb908..75230a2 100644 --- a/bdk/usb/xusbd.c +++ b/bdk/usb/xusbd.c @@ -1996,7 +1996,7 @@ void xusb_end(bool reset_ep, bool only_controller) _xusb_disable_ep1(); // Disable device mode. - XUSB_DEV_XHCI(XUSB_DEV_XHCI_CTRL) &= ~XHCI_CTRL_ENABLE; + XUSB_DEV_XHCI(XUSB_DEV_XHCI_CTRL) = 0; //! TODO: Add only controller support? _xusb_device_power_down();