forked from KolibriOS/kolibrios
Fixed 3c59x driver to work with 3c900b-tpo cards
git-svn-id: svn://kolibrios.org@1521 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
28fb09b79d
commit
55e0141343
File diff suppressed because it is too large
Load Diff
@ -54,11 +54,14 @@ macro set_io addr {
|
|||||||
macro allocate_and_clear dest, size, err {
|
macro allocate_and_clear dest, size, err {
|
||||||
|
|
||||||
; We need to allocate at least 8 pages, if we want a continuous memory in ram
|
; We need to allocate at least 8 pages, if we want a continuous memory in ram
|
||||||
|
push edx
|
||||||
if (size < 8*4096) & (size > 4096)
|
if (size < 8*4096) & (size > 4096)
|
||||||
stdcall KernelAlloc, 8*4096
|
stdcall KernelAlloc, 8*4096
|
||||||
else
|
else
|
||||||
stdcall KernelAlloc, size
|
stdcall KernelAlloc, size
|
||||||
end if
|
end if
|
||||||
|
pop edx
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz err
|
jz err
|
||||||
mov dest, eax ; Save the address to it into the device struct
|
mov dest, eax ; Save the address to it into the device struct
|
||||||
@ -68,7 +71,9 @@ macro allocate_and_clear dest, size, err {
|
|||||||
if (size < 8*4096) & (size > 4096)
|
if (size < 8*4096) & (size > 4096)
|
||||||
add eax, (size/4096+1)*4096
|
add eax, (size/4096+1)*4096
|
||||||
mov ecx, 8-(size/4096+1)
|
mov ecx, 8-(size/4096+1)
|
||||||
|
push edx
|
||||||
call ReleasePages
|
call ReleasePages
|
||||||
|
pop edx
|
||||||
end if
|
end if
|
||||||
|
|
||||||
; Clear the allocated buffer
|
; Clear the allocated buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user