315,7 → 315,8 |
; 2b. Fill first 32 entries. |
inc eax |
inc eax ; set QH bit for uhci_pipe.NextQH |
movi ecx, 32 |
push 32 |
pop ecx |
mov edx, ecx |
@@: |
stosd |
415,10 → 416,12 |
mov ax, 2 |
out dx, ax |
; 5f. Wait up to 10ms. |
movi ecx, 10 |
push 10 |
pop ecx |
@@: |
push esi |
movi esi, 1 |
push 1 |
pop esi |
call delay_ms |
pop esi |
in ax, dx |
432,7 → 435,8 |
; emergency variant for tests - always wait 10 ms |
; wait 10 ms |
push esi |
movi esi, 10 |
push 10 |
pop esi |
call delay_ms |
pop esi |
; clear reset signal |
994,7 → 998,8 |
; * if several non-fatal errors have occured during transaction retries, |
; all corresponding bits are set. In this case, return some error code, |
; the order is quite arbitrary. |
movi ecx, USB_STATUS_UNDERRUN |
push USB_STATUS_UNDERRUN |
pop ecx |
test al, 1 shl (22-16) ; not Stalled? |
jz .know_error |
mov cl, USB_STATUS_OVERRUN |
1255,7 → 1260,8 |
; 2. Status bits in UHCI are invalid during reset signalling. |
; Wait a millisecond while status bits become valid again. |
push esi |
movi esi, 1 |
push 1 |
pop esi |
call delay_ms |
pop esi |
; 3. ConnectStatus bit is zero during reset and becomes 1 during step 2; |
1452,7 → 1458,8 |
; if so, return an error. |
lea edx, [esi + uhci_controller.IntEDs - sizeof.uhci_controller] |
lea eax, [esi + uhci_controller.IntEDs + 32*sizeof.uhci_static_ep - sizeof.uhci_controller] |
movi ecx, 64 |
push 64 |
pop ecx |
call usb1_select_interrupt_list |
test edx, edx |
jz .return0 |