Subversion Repositories Kolibri OS

Rev

Rev 3656 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3656 Rev 3826
Line 917... Line 917...
917
; There are two schedulers, one for high-speed devices,
917
; There are two schedulers, one for high-speed devices,
918
; another for split transactions.
918
; another for split transactions.
919
; This could fail if the requested bandwidth is not available;
919
; This could fail if the requested bandwidth is not available;
920
; if so, return an error.
920
; if so, return an error.
921
        test    word [edi+ehci_pipe.Flags-sizeof.ehci_pipe+2], 3FFFh
921
        test    word [edi+ehci_pipe.Flags-sizeof.ehci_pipe+2], 3FFFh
922
        jnz     .interrupt_fs
922
        jnz     .interrupt_tt
923
        call    ehci_select_hs_interrupt_list
923
        call    ehci_select_hs_interrupt_list
924
        jmp     .interrupt_common
924
        jmp     .interrupt_common
925
.interrupt_fs:
925
.interrupt_tt:
926
        call    ehci_select_fs_interrupt_list
926
        call    ehci_select_tt_interrupt_list
927
.interrupt_common:
927
.interrupt_common:
928
        test    edx, edx
928
        test    edx, edx
929
        jz      .return0
929
        jz      .return0
930
        mov     word [edi+ehci_pipe.Flags-sizeof.ehci_pipe], ax
930
        mov     word [edi+ehci_pipe.Flags-sizeof.ehci_pipe], ax
931
.insert:
931
.insert:
Line 1308... Line 1308...
1308
; of the last high-speed hub (the closest to the device hub)
1308
; of the last high-speed hub (the closest to the device hub)
1309
; for split transactions, and set ControlEndpoint bit in eax;
1309
; for split transactions, and set ControlEndpoint bit in eax;
1310
; ehci_init_pipe assumes that the parent pipe is a control pipe.
1310
; ehci_init_pipe assumes that the parent pipe is a control pipe.
1311
        movzx   ecx, [esi+usb_controller.ResettingPort]
1311
        movzx   ecx, [esi+usb_controller.ResettingPort]
1312
        mov     edx, [esi+usb_controller.ResettingHub]
1312
        mov     edx, [esi+usb_controller.ResettingHub]
-
 
1313
; If the parent hub is high-speed, it is TT for the device.
-
 
1314
; Otherwise, the parent hub itself is behind TT, and the device
-
 
1315
; has the same TT hub+port as the parent hub.
1313
        push    eax
1316
        push    eax
1314
.find_hs_hub:
-
 
1315
        mov     eax, [edx+usb_hub.ConfigPipe]
1317
        mov     eax, [edx+usb_hub.ConfigPipe]
1316
        mov     eax, [eax+usb_pipe.DeviceData]
1318
        mov     eax, [eax+usb_pipe.DeviceData]
1317
        cmp     [eax+usb_device_data.Speed], USB_SPEED_HS
1319
        cmp     [eax+usb_device_data.Speed], USB_SPEED_HS
1318
        jz      .found_hs_hub
1320
        jz      @f
1319
        movzx   ecx, [eax+usb_device_data.Port]
1321
        movzx   ecx, [eax+usb_device_data.TTPort]
1320
        mov     edx, [eax+usb_device_data.Hub]
1322
        mov     edx, [eax+usb_device_data.TTHub]
1321
        jmp     .find_hs_hub
-
 
1322
.found_hs_hub:
1323
@@:
1323
        mov     edx, [edx+usb_hub.ConfigPipe]
1324
        mov     edx, [edx+usb_hub.ConfigPipe]
1324
        inc     ecx
1325
        inc     ecx
1325
        mov     edx, [edx+ehci_pipe.Token-sizeof.ehci_pipe]
1326
        mov     edx, [edx+ehci_pipe.Token-sizeof.ehci_pipe]
1326
        shl     ecx, 23
1327
        shl     ecx, 23
1327
        and     edx, 7Fh
1328
        and     edx, 7Fh