From 9dd52fddf052b745fd379ca2d3d2ed2cd41f0011 Mon Sep 17 00:00:00 2001 From: Till Harbaum Date: Mon, 15 Jul 2024 10:55:46 +0200 Subject: [PATCH] Workaround for BL616 power control --- port/ehci/usb_hc_ehci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port/ehci/usb_hc_ehci.c b/port/ehci/usb_hc_ehci.c index b2e3d46e..0ee5d2ad 100644 --- a/port/ehci/usb_hc_ehci.c +++ b/port/ehci/usb_hc_ehci.c @@ -1101,8 +1101,8 @@ int usbh_roothub_control(struct usbh_bus *bus, struct usb_setup_packet *setup, u if (temp & EHCI_PORTSC_RESET) { status |= (1 << HUB_PORT_FEATURE_RESET); } - if (temp & EHCI_PORTSC_PP) { - status |= (1 << HUB_PORT_FEATURE_POWER); + if (temp & EHCI_PORTSC_PP || !(EHCI_HCCR->hcsparams & EHCI_HCSPARAMS_PPC) ) { + status |= (1 << HUB_PORT_FEATURE_POWER ); } memcpy(buf, &status, 4); break;