forked from KolibriOS/kolibrios
i8255x: Fail graciously when out of mem.
git-svn-id: svn://kolibrios.org@5561 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c5df59af4b
commit
c9d8d9f37b
@ -822,6 +822,8 @@ int_handler:
|
|||||||
; allocate new descriptor
|
; allocate new descriptor
|
||||||
|
|
||||||
invoke NetAlloc, 2000
|
invoke NetAlloc, 2000
|
||||||
|
test eax, eax
|
||||||
|
jz .out_of_mem
|
||||||
mov [ebx + device.rx_desc], eax
|
mov [ebx + device.rx_desc], eax
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
invoke GetPhysAddr
|
invoke GetPhysAddr
|
||||||
@ -845,6 +847,7 @@ int_handler:
|
|||||||
mov ax, RX_START
|
mov ax, RX_START
|
||||||
out dx, ax
|
out dx, ax
|
||||||
call cmd_wait
|
call cmd_wait
|
||||||
|
.out_of_mem:
|
||||||
|
|
||||||
; And give packet to kernel
|
; And give packet to kernel
|
||||||
jmp [EthInput]
|
jmp [EthInput]
|
||||||
|
Loading…
Reference in New Issue
Block a user