allocate_and_clear macro now clears even the last odd bytes. (fix problem with RTL8139)

git-svn-id: svn://kolibrios.org@3635 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-06-10 17:32:49 +00:00
parent e7b74632f9
commit 6a2df080e4
2 changed files with 8 additions and 2 deletions

View File

@ -211,6 +211,7 @@ virtual at ebx
.irq_line db ?
.hw_ver_id db ?
db ? ; align 4
.TX_DESC rd NUM_TX_DESC
.size = $ - device
@ -821,7 +822,7 @@ int_handler:
cmp eax, RX_BUFFER_SIZE
jb .no_wrap
DEBUGF 2, "Wrapping"
DEBUGF 1, "Wrapping"
sub eax, RX_BUFFER_SIZE
.no_wrap:
mov [device.rx_data_offset], eax
@ -960,7 +961,7 @@ int_handler:
call cable
.fail:
DEBUGF 2, "\n"
DEBUGF 1, "\n"
pop edi esi ebx
xor eax, eax
inc eax

View File

@ -76,6 +76,11 @@ macro allocate_and_clear dest, size, err {
xor eax, eax
rep stosd
if (size - size/4*4)
mov ecx, size - size/4*4
rep stosb
end if
}
struc IOCTL {