Skip to content

Commit acaf5fb

Browse files
authored
Merge pull request #4046 from jamike/USBHOST_HUB_FIX
USBHOST : fix device disconnection from hub during hub port reset
2 parents e3c0ac6 + f6f7393 commit acaf5fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/unsupported/USBHost/USBHostHub/USBHostHub.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ void USBHostHub::portReset(uint8_t port) {
227227
#endif
228228
while(1) {
229229
status = getPortStatus(port);
230+
/* disconnection since reset request */
231+
if (!(status & PORT_CONNECTION))
232+
break;
230233
if (status & (PORT_ENABLE | PORT_RESET))
231234
break;
232235
if (status & PORT_OVER_CURRENT) {

0 commit comments

Comments
 (0)