forked from KolibriOS/kolibrios
fix crash if disconnecting when reading/writing introduced in r4346
git-svn-id: svn://kolibrios.org@4549 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
96d11ce70a
commit
437347b036
@ -518,7 +518,7 @@ end virtual
|
|||||||
jz .error
|
jz .error
|
||||||
ret 20
|
ret 20
|
||||||
.error:
|
.error:
|
||||||
DEBUGF 1, 'K : error %d while resetting', [.status]
|
DEBUGF 1, 'K : error %d while resetting', [.status+24h]
|
||||||
jmp request_callback1.common_error
|
jmp request_callback1.common_error
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -562,7 +562,16 @@ end virtual
|
|||||||
.error:
|
.error:
|
||||||
; Error.
|
; Error.
|
||||||
; 7. Print debug message and complete the request as failed.
|
; 7. Print debug message and complete the request as failed.
|
||||||
DEBUGF 1,'K : error %d after %d bytes in request stage\n',eax,[.length]
|
DEBUGF 1,'K : error %d after %d bytes in request stage\n',eax,[.length+24h]
|
||||||
|
; If device is disconnected and data stage is enqueued, do nothing;
|
||||||
|
; data stage callback will do everything.
|
||||||
|
cmp eax, 16
|
||||||
|
jnz .common_error
|
||||||
|
cmp [ecx+usb_device_data.Command.Flags], 0
|
||||||
|
js .common_error
|
||||||
|
cmp [ecx+usb_device_data.Command.Length], 0
|
||||||
|
jz .common_error
|
||||||
|
ret 20
|
||||||
.common_error:
|
.common_error:
|
||||||
; TODO: add recovery after STALL
|
; TODO: add recovery after STALL
|
||||||
mov ecx, [.calldata]
|
mov ecx, [.calldata]
|
||||||
@ -623,8 +632,12 @@ end if
|
|||||||
ret 20
|
ret 20
|
||||||
.error:
|
.error:
|
||||||
; Error.
|
; Error.
|
||||||
; 7. Print debug message and complete the request as failed.
|
; 5. Print debug message and complete the request as failed.
|
||||||
DEBUGF 1,'K : error %d after %d bytes in data stage\n',eax,[.length]
|
DEBUGF 1,'K : error %d after %d bytes in data stage\n',eax,[.length+24h]
|
||||||
|
; If device is disconnected and data stage is enqueued, do nothing;
|
||||||
|
; status stage callback will do everything.
|
||||||
|
cmp [ecx+usb_device_data.Command.Flags], 0
|
||||||
|
js .nothing
|
||||||
jmp request_callback1.common_error
|
jmp request_callback1.common_error
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -707,7 +720,7 @@ end if
|
|||||||
jmp .complete
|
jmp .complete
|
||||||
.transfer_error:
|
.transfer_error:
|
||||||
; TODO: add recovery after STALL
|
; TODO: add recovery after STALL
|
||||||
DEBUGF 1,'K : error %d after %d bytes in status stage\n',eax,[.length]
|
DEBUGF 1,'K : error %d after %d bytes in status stage\n',eax,[.length+24h]
|
||||||
jmp request_callback1.common_error
|
jmp request_callback1.common_error
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user