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:
hidnplayr 2010-07-16 15:37:50 +00:00
parent 28fb09b79d
commit 55e0141343
2 changed files with 250 additions and 208 deletions

File diff suppressed because it is too large Load Diff

View File

@ -54,11 +54,14 @@ macro set_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
push edx
if (size < 8*4096) & (size > 4096)
stdcall KernelAlloc, 8*4096
else
stdcall KernelAlloc, size
end if
pop edx
test eax, eax
jz err
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)
add eax, (size/4096+1)*4096
mov ecx, 8-(size/4096+1)
push edx
call ReleasePages
pop edx
end if
; Clear the allocated buffer