Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3724 → Rev 3725

/kernel/branches/Kolibri-acpi/bus/usb/memory.inc
26,7 → 26,7
endg
 
; sanity check: structures in UHCI and OHCI should be the same for allocation
if (sizeof.ohci_pipe=sizeof.uhci_pipe)&(ohci_pipe.SoftwarePart=uhci_pipe.SoftwarePart)
if (sizeof.ohci_pipe = sizeof.uhci_pipe)
 
; Allocates one endpoint structure for UHCI/OHCI.
; Returns pointer to software part (usb_pipe) in eax.
33,10 → 33,10
proc usb1_allocate_endpoint
push ebx
mov ebx, usb1_ep_mutex
stdcall usb_allocate_common, sizeof.ohci_pipe
stdcall usb_allocate_common, (sizeof.ohci_pipe + sizeof.usb_pipe + 0Fh) and not 0Fh
test eax, eax
jz @f
add eax, ohci_pipe.SoftwarePart
add eax, sizeof.ohci_pipe
@@:
pop ebx
ret
45,7 → 45,7
; Free one endpoint structure for UHCI/OHCI.
; Stdcall with one argument, pointer to software part (usb_pipe).
proc usb1_free_endpoint
sub dword [esp+4], ohci_pipe.SoftwarePart
sub dword [esp+4], sizeof.ohci_pipe
jmp usb_free_common
endp
 
55,7 → 55,7
end if
 
; sanity check: structures in UHCI and OHCI should be the same for allocation
if (sizeof.ohci_gtd=sizeof.uhci_gtd)&(ohci_gtd.SoftwarePart=uhci_gtd.SoftwarePart)
if (sizeof.ohci_gtd = sizeof.uhci_gtd)
 
; Allocates one general transfer descriptor structure for UHCI/OHCI.
; Returns pointer to software part (usb_gtd) in eax.
62,10 → 62,10
proc usb1_allocate_general_td
push ebx
mov ebx, usb_gtd_mutex
stdcall usb_allocate_common, sizeof.ohci_gtd
stdcall usb_allocate_common, (sizeof.ohci_gtd + sizeof.usb_gtd + 0Fh) and not 0Fh
test eax, eax
jz @f
add eax, ohci_gtd.SoftwarePart
add eax, sizeof.ohci_gtd
@@:
pop ebx
ret
74,7 → 74,7
; Free one general transfer descriptor structure for UHCI/OHCI.
; Stdcall with one argument, pointer to software part (usb_gtd).
proc usb1_free_general_td
sub dword [esp+4], ohci_gtd.SoftwarePart
sub dword [esp+4], sizeof.ohci_gtd
jmp usb_free_common
endp