Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1528 → Rev 1529

/kernel/branches/net/drivers/netdrv.inc
35,22 → 35,15
macro set_io addr {
 
if addr = 0
 
mov edx, [device.io_addr]
 
else if addr = LAST_IO
 
else
 
add edx, addr - LAST_IO
 
end if
 
LAST_IO = addr
}
 
 
 
macro allocate_and_clear dest, size, err {
 
; We need to allocate at least 8 pages, if we want a continuous memory in ram
83,8 → 76,6
 
}
 
 
 
macro find_io bus, dev, io {
 
local .check, .inc, .got
126,7 → 117,6
 
}
 
 
macro find_rev bus, dev, rev {
 
push eax edx ecx
138,8 → 128,6
 
}
 
 
 
macro make_bus_master bus, dev {
 
movzx ecx, bus
168,10 → 156,7
end virtual
 
 
 
 
if used null_op
 
align 4
null_op:
or eax, -1
180,11 → 165,11
end if
 
 
macro virt_to_dma { ; input is eax
macro GetRealAddr { ; input is eax
 
push ax
call GetPgAddr
and word[esp], PAGESIZE - 1
call GetPgAddr
or ax, word[esp]
inc esp
inc esp
209,7 → 194,7
.end:
}
 
;struc ETH_DEVICE {
 
macro ETH_DEVICE {
NET_DEVICE
 
235,16 → 220,4
 
.mode dd ?
 
}
 
macro GetRealAddr {
 
push eax
call GetPgAddr
and dword [esp], (PAGESIZE - 1)
or eax, dword [esp]
add esp, 4
 
}
 
 
}