Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5560 → Rev 5559

/drivers/ethernet/i8255x.asm
18,7 → 18,6
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;TODO: use more RX buffers
 
format PE DLL native
entry START
378,6 → 377,7
; - Remove all allocated structures and buffers the card used
 
or eax, -1
 
ret
 
 
611,7 → 611,7
invoke GetPhysAddr
add eax, NET_BUFF.data
mov [esi + sizeof.NET_BUFF + rxfd.status], 0x0000
mov [esi + sizeof.NET_BUFF + rxfd.command], 0xc000 ; End of list + Suspend
mov [esi + sizeof.NET_BUFF + rxfd.command], 0x0000
mov [esi + sizeof.NET_BUFF + rxfd.link], eax
mov [esi + sizeof.NET_BUFF + rxfd.count], 0
mov [esi + sizeof.NET_BUFF + rxfd.size], 1528
619,6 → 619,7
ret
 
.out_of_mem:
 
ret
 
 
836,9 → 837,8
 
set_io [ebx + device.io_addr], 0
set_io [ebx + device.io_addr], reg_scb_ptr
; mov eax, [ebx + device.rx_desc]
; lea eax, [ebx + device.rx_desc]
; invoke GetPhysAddr
; add eax, NET_BUFF.data
out dx, eax
 
set_io [ebx + device.io_addr], reg_scb_cmd
890,18 → 890,27
cmp ax, 00001000b
jne .fail
 
DEBUGF 2, "Out of resources!\n"
DEBUGF 1, "out of resources!\n"
; Restart the RX
 
; call init_rx_ring
; test eax, eax
; jz .fail
; allocate new descriptor
 
invoke KernelAlloc, 2000
mov [ebx + device.rx_desc], eax
mov esi, eax
invoke GetPhysAddr
mov [esi + rxfd.status], 0x0000
mov [esi + rxfd.command], 0xc000 ; End of list + Suspend
mov [esi + rxfd.link], eax
mov [esi + rxfd.count], 0
mov [esi + rxfd.size], 1528
 
; restart RX
 
set_io [ebx + device.io_addr], 0
set_io [ebx + device.io_addr], reg_scb_ptr
mov eax, [ebx + device.rx_desc]
invoke GetPhysAddr
add eax, NET_BUFF.data
; lea eax, [ebx + device.rx_desc]
; invoke GetPhysAddr
out dx, eax
 
set_io [ebx + device.io_addr], reg_scb_cmd