Rev 3555 | Rev 4423 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3555 | Rev 3908 | ||
---|---|---|---|
Line 214... | Line 214... | ||
214 | 214 | ||
215 | ; Part of API for drivers, see documentation for USBOpenPipe. |
215 | ; Part of API for drivers, see documentation for USBOpenPipe. |
216 | proc usb_open_pipe stdcall uses ebx esi edi,\ |
216 | proc usb_open_pipe stdcall uses ebx esi edi,\ |
217 | config_pipe:dword, endpoint:dword, maxpacket:dword, type:dword, interval:dword |
217 | config_pipe:dword, endpoint:dword, maxpacket:dword, type:dword, interval:dword |
- | 218 | locals |
|
218 | locals |
219 | tt_vars rd (ehci_select_tt_interrupt_list.local_vars_size + 3) / 4 |
219 | targetsmask dd ? ; S-Mask for USB2 |
220 | targetsmask dd ? ; S-Mask for USB2 |
220 | bandwidth dd ? |
221 | bandwidth dd ? |
221 | target dd ? |
222 | target dd ? |
222 | endl |
223 | endl |
Line 507... | Line 508... | ||
507 | ret |
508 | ret |
508 | .last_pipe: |
509 | .last_pipe: |
509 | ; That was the last pipe for the device. |
510 | ; That was the last pipe for the device. |
510 | ; 5. Notify device driver(s) about disconnect. |
511 | ; 5. Notify device driver(s) about disconnect. |
511 | call mutex_unlock |
512 | call mutex_unlock |
512 | movzx eax, [ecx+usb_device_data.NumInterfaces] |
513 | mov eax, [ecx+usb_device_data.NumInterfaces] |
513 | test eax, eax |
514 | test eax, eax |
514 | jz .notify_done |
515 | jz .notify_done |
515 | add ecx, [ecx+usb_device_data.Interfaces] |
516 | add ecx, [ecx+usb_device_data.Interfaces] |
516 | .notify_loop: |
517 | .notify_loop: |
517 | mov edx, [ecx+usb_interface_data.DriverFunc] |
518 | mov edx, [ecx+usb_interface_data.DriverFunc] |
Line 695... | Line 696... | ||
695 | .return0: |
696 | .return0: |
696 | xor eax, eax |
697 | xor eax, eax |
697 | ret |
698 | ret |
698 | endp |
699 | endp |
Line -... | Line 700... | ||
- | 700 | ||
- | 701 | ; Part of API for drivers, see documentation for USBGetParam. |
|
- | 702 | proc usb_get_param |
|
- | 703 | virtual at esp |
|
- | 704 | dd ? ; return address |
|
- | 705 | .pipe dd ? |
|
- | 706 | .param dd ? |
|
- | 707 | end virtual |
|
- | 708 | mov edx, [.param] |
|
- | 709 | mov ecx, [.pipe] |
|
- | 710 | mov eax, [ecx+usb_pipe.DeviceData] |
|
- | 711 | test edx, edx |
|
- | 712 | jz .get_device_descriptor |
|
- | 713 | dec edx |
|
- | 714 | jz .get_config_descriptor |
|
- | 715 | dec edx |
|
- | 716 | jz .get_speed |
|
- | 717 | or eax, -1 |
|
- | 718 | ret 8 |
|
- | 719 | .get_device_descriptor: |
|
- | 720 | add eax, usb_device_data.DeviceDescriptor |
|
- | 721 | ret 8 |
|
- | 722 | .get_config_descriptor: |
|
- | 723 | movzx ecx, [eax+usb_device_data.DeviceDescrSize] |
|
- | 724 | lea eax, [eax+ecx+usb_device_data.DeviceDescriptor] |
|
- | 725 | ret 8 |
|
- | 726 | .get_speed: |
|
- | 727 | movzx eax, [eax+usb_device_data.Speed] |
|
- | 728 | ret 8 |
|
- | 729 | endp |
|
699 | 730 | ||
700 | ; Initialize software part of usb_gtd. Called from controller-specific code |
731 | ; Initialize software part of usb_gtd. Called from controller-specific code |
701 | ; somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, |
732 | ; somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, |
702 | ; ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> |
733 | ; ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> |
703 | ; current (initializing) usb_gtd. |
734 | ; current (initializing) usb_gtd. |