Rev 4346 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4346 | Rev 4549 | ||
---|---|---|---|
Line 516... | Line 516... | ||
516 | pop esi ebx |
516 | pop esi ebx |
517 | test eax, eax |
517 | test eax, eax |
518 | jz .error |
518 | jz .error |
519 | ret 20 |
519 | ret 20 |
520 | .error: |
520 | .error: |
521 | DEBUGF 1, 'K : error %d while resetting', [.status] |
521 | DEBUGF 1, 'K : error %d while resetting', [.status+24h] |
522 | jmp request_callback1.common_error |
522 | jmp request_callback1.common_error |
523 | endp |
523 | endp |
Line 524... | Line 524... | ||
524 | 524 | ||
525 | ; Called when the first stage of request is completed, |
525 | ; Called when the first stage of request is completed, |
Line 560... | Line 560... | ||
560 | .nothing: |
560 | .nothing: |
561 | ret 20 |
561 | ret 20 |
562 | .error: |
562 | .error: |
563 | ; Error. |
563 | ; Error. |
564 | ; 7. Print debug message and complete the request as failed. |
564 | ; 7. Print debug message and complete the request as failed. |
565 | DEBUGF 1,'K : error %d after %d bytes in request stage\n',eax,[.length] |
565 | DEBUGF 1,'K : error %d after %d bytes in request stage\n',eax,[.length+24h] |
- | 566 | ; If device is disconnected and data stage is enqueued, do nothing; |
|
- | 567 | ; data stage callback will do everything. |
|
- | 568 | cmp eax, 16 |
|
- | 569 | jnz .common_error |
|
- | 570 | cmp [ecx+usb_device_data.Command.Flags], 0 |
|
- | 571 | js .common_error |
|
- | 572 | cmp [ecx+usb_device_data.Command.Length], 0 |
|
- | 573 | jz .common_error |
|
- | 574 | ret 20 |
|
566 | .common_error: |
575 | .common_error: |
567 | ; TODO: add recovery after STALL |
576 | ; TODO: add recovery after STALL |
568 | mov ecx, [.calldata] |
577 | mov ecx, [.calldata] |
569 | mov [ecx+usb_device_data.Status.Status], CSW_STATUS_FATAL |
578 | mov [ecx+usb_device_data.Status.Status], CSW_STATUS_FATAL |
570 | push ebx esi |
579 | push ebx esi |
Line 621... | Line 630... | ||
621 | jz .error |
630 | jz .error |
622 | .nothing: |
631 | .nothing: |
623 | ret 20 |
632 | ret 20 |
624 | .error: |
633 | .error: |
625 | ; Error. |
634 | ; Error. |
626 | ; 7. Print debug message and complete the request as failed. |
635 | ; 5. Print debug message and complete the request as failed. |
627 | DEBUGF 1,'K : error %d after %d bytes in data stage\n',eax,[.length] |
636 | DEBUGF 1,'K : error %d after %d bytes in data stage\n',eax,[.length+24h] |
- | 637 | ; If device is disconnected and data stage is enqueued, do nothing; |
|
- | 638 | ; status stage callback will do everything. |
|
- | 639 | cmp [ecx+usb_device_data.Command.Flags], 0 |
|
- | 640 | js .nothing |
|
628 | jmp request_callback1.common_error |
641 | jmp request_callback1.common_error |
629 | endp |
642 | endp |
Line 630... | Line 643... | ||
630 | 643 | ||
631 | ; Called when the third stage of request is completed, |
644 | ; Called when the third stage of request is completed, |
Line 705... | Line 718... | ||
705 | DEBUGF 1,'K : fail during REQUEST SENSE\n' |
718 | DEBUGF 1,'K : fail during REQUEST SENSE\n' |
706 | mov byte [esi+usb_device_data.Sense], 0 |
719 | mov byte [esi+usb_device_data.Sense], 0 |
707 | jmp .complete |
720 | jmp .complete |
708 | .transfer_error: |
721 | .transfer_error: |
709 | ; TODO: add recovery after STALL |
722 | ; TODO: add recovery after STALL |
710 | DEBUGF 1,'K : error %d after %d bytes in status stage\n',eax,[.length] |
723 | DEBUGF 1,'K : error %d after %d bytes in status stage\n',eax,[.length+24h] |
711 | jmp request_callback1.common_error |
724 | jmp request_callback1.common_error |
712 | endp |
725 | endp |
Line 713... | Line 726... | ||
713 | 726 | ||
714 | ; Builder for SCSI_REQUEST_SENSE request. |
727 | ; Builder for SCSI_REQUEST_SENSE request. |