From a0fd67cc25e7ae91d87fbf1abe20fbb8f6008d5e Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Wed, 27 Nov 2013 11:06:59 +0000 Subject: [PATCH] ignore fake connect events immediately after reset on eBox git-svn-id: svn://kolibrios.org@4300 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/bus/usb/ehci.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/bus/usb/ehci.inc b/kernel/trunk/bus/usb/ehci.inc index 166b047123..2da2d5d8ea 100644 --- a/kernel/trunk/bus/usb/ehci.inc +++ b/kernel/trunk/bus/usb/ehci.inc @@ -592,7 +592,6 @@ proc ehci_kickoff_bios ; corrupted. ; Use a value from MMIO as a starting point. mov edx, [eax+EhciCapParamsReg] - DEBUGF 1,'K : edx=%x\n',edx movzx edi, byte [eax+EhciCapLengthReg] add edi, eax push 0 @@ -1394,12 +1393,18 @@ proc ehci_process_deferred ; There was a connect or disconnect event at this port. ; 3g. Disconnect the old device on this port, if any. ; If the port was resetting, indicate fail; later stages will process it. +; Ignore connect event immediately after resetting. cmp [esi+usb_controller.ResettingHub], 0 - jnz @f + jnz .csc.noreset cmp cl, [esi+usb_controller.ResettingPort] + jnz .csc.noreset + cmp [esi+usb_controller.ResettingStatus], 2 jnz @f - mov [esi+usb_controller.ResettingStatus], -1 + test al, 1 + jnz .nextport @@: + mov [esi+usb_controller.ResettingStatus], -1 +.csc.noreset: bts [esi+usb_controller.NewDisconnected], ecx ; 3h. Change connected status. For the connection event, also store ; the connection time; any further processing is permitted only after