Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1889 → Rev 1888

/kernel/branches/net/drivers/R6040.asm
195,7 → 195,6
 
.cur_rx dw ?
.cur_tx dw ?
.last_tx dw ?
.phy_addr dw ?
.phy_mode dw ?
.mcr0 dw ?
206,7 → 205,7
.pci_dev db ?
.irq_line db ?
 
rb 1 ; dword alignment
rb 3 ; dword alignment
 
.tx_ring: rb (((x_head.sizeof*TX_RING_SIZE)+32) and 0xfffffff0)
.rx_ring: rb (((x_head.sizeof*RX_RING_SIZE)+32) and 0xfffffff0)
651,7 → 650,6
 
.next_desc:
mov [esi + x_head.ndesc], eax
mov [edi + x_head.skb_ptr], 0
mov [esi + x_head.status], DSC_OWNER_MAC
 
add eax, x_head.sizeof
833,7 → 831,7
xor eax, eax
dec eax
.fail:
DEBUGF 1,"Send timeout\n"
DEBUGF 1,"R6040: Send timeout\n"
ret 8
 
 
878,16 → 876,14
add esi, 4
dec ecx
jnz .nextdevice
 
.fail: ; If no device was found, abort (The irq was probably for a device, not registered to this driver)
; If no device was found, abort (The irq was probably for a device, not registered to this driver)
ret
 
; At this point, test for all possible reasons, and handle accordingly
 
.got_it:
push ax
 
test word [esp], RX_FINISH
test ax, RX_FINISH
jz .no_RX
 
push ebx
946,37 → 942,11
 
jmp EthReceiver
 
 
.no_RX:
 
test word [esp], TX_FINISH
jz .no_TX
.fail:
 
.loop_tx:
movzx edi, [device.last_tx]
shl edi, 5
lea edi, [device.tx_ring + edi]
 
test [edi + x_head.status], DSC_OWNER_MAC
jnz .tx_loop_end
 
cmp [edi + x_head.skb_ptr], 0
je .tx_loop_end
 
DEBUGF 1,"Freeing buffer 0x%x\n", [edi + x_head.skb_ptr]
 
push [edi + x_head.skb_ptr]
call KernelFree
mov [edi + x_head.skb_ptr], 0
 
inc [device.last_tx]
and [device.last_tx], TX_RING_SIZE - 1
jmp .loop_tx
 
.tx_loop_end:
 
.no_TX:
pop ax
ret