/kernel/trunk/bus/usb/protocol.inc |
---|
459,10 → 459,7 |
; save length for step 2 |
push eax |
add eax, sizeof.usb_device_data + 8 |
; Note that malloc destroys ebx. |
push ebx |
call malloc |
pop ebx |
; 1b. If failed, say something to the debug board and stop the initialization. |
test eax, eax |
jz .nomemory |
/kernel/trunk/bus/usb/uhci.inc |
---|
1640,12 → 1640,10 |
; 1c. We need a temporary buffer. Allocate [packetSize]*2 bytes, so that |
; there must be [packetSize] bytes on one page, |
; plus space for a header uhci_original_buffer. |
push ebx |
mov eax, [.packetSize] |
add eax, eax |
add eax, sizeof.uhci_original_buffer |
call malloc |
pop ebx |
; 1d. If failed, return zero. |
test eax, eax |
jz .nothing |