forked from KolibriOS/kolibrios
Added error reporting to some of the network drivers in net branch
git-svn-id: svn://kolibrios.org@2387 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d0e0776223
commit
997d83d275
@ -2394,6 +2394,7 @@ boomerang_transmit:
|
||||
|
||||
.fail:
|
||||
stdcall KernelFree, [esp+4]
|
||||
or eax, -1
|
||||
ret 8
|
||||
|
||||
|
||||
|
@ -720,9 +720,12 @@ transmit:
|
||||
add dword [device.bytes_tx], eax
|
||||
adc dword [device.bytes_tx + 4], 0
|
||||
|
||||
stdcall KernelFree, [esp+4]
|
||||
xor eax, eax
|
||||
ret 8
|
||||
|
||||
.err:
|
||||
or eax, -1
|
||||
.finish:
|
||||
stdcall KernelFree, [esp+4]
|
||||
ret 8
|
||||
|
||||
|
@ -728,6 +728,7 @@ transmit:
|
||||
.fail:
|
||||
DEBUGF 1,"failed!\n"
|
||||
stdcall KernelFree, [esp+4]
|
||||
or eax, -1
|
||||
ret 8
|
||||
|
||||
|
||||
|
@ -1085,6 +1085,7 @@ transmit:
|
||||
add dword [device.bytes_tx], eax
|
||||
adc dword [device.bytes_tx + 4], 0
|
||||
|
||||
xor eax, eax
|
||||
ret 8
|
||||
|
||||
.fail:
|
||||
|
@ -595,9 +595,9 @@ transmit:
|
||||
[eax+13]:2,[eax+12]:2
|
||||
|
||||
cmp dword [esp+8], 1500
|
||||
jg .finish ; packet is too long
|
||||
jg .error ; packet is too long
|
||||
cmp dword [esp+8], 60
|
||||
jl .finish ; packet is too short
|
||||
jl .error ; packet is too short
|
||||
|
||||
set_io 0
|
||||
in ax, dx
|
||||
@ -643,9 +643,13 @@ transmit:
|
||||
in ax, dx
|
||||
|
||||
.finish:
|
||||
xor eax, eax
|
||||
ret 8
|
||||
|
||||
|
||||
.error:
|
||||
stdcall KernelFree, [esp+4]
|
||||
or eax, -1
|
||||
ret 8
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
|
@ -956,9 +956,9 @@ transmit:
|
||||
[eax+13]:2,[eax+12]:2
|
||||
|
||||
cmp dword [esp+8], 1514
|
||||
jg .finish ; packet is too long
|
||||
jg .nospace ; packet is too long
|
||||
cmp dword [esp+8], 60
|
||||
jl .finish ; packet is too short
|
||||
jl .nospace ; packet is too short
|
||||
|
||||
; check descriptor
|
||||
movzx eax, [device.cur_tx]
|
||||
@ -1000,12 +1000,13 @@ transmit:
|
||||
.finish:
|
||||
DEBUGF 2," - Done!\n"
|
||||
stdcall KernelFree, [esp+4]
|
||||
xor eax, eax
|
||||
ret 8
|
||||
|
||||
.nospace:
|
||||
DEBUGF 1, 'ERROR: no free transmit descriptors\n'
|
||||
; todo: maybe somehow notify the kernel about the error?
|
||||
stdcall KernelFree, [esp+4]
|
||||
or eax, -1
|
||||
ret 8
|
||||
|
||||
|
||||
|
@ -1258,10 +1258,10 @@ align 4
|
||||
transmit:
|
||||
|
||||
cmp dword [esp+8], MAX_ETH_FRAME_SIZE
|
||||
ja .finish
|
||||
ja .error
|
||||
|
||||
cmp dword [esp+8], 60
|
||||
jb .finish
|
||||
jb .error
|
||||
|
||||
movzx ecx, [device.cur_tx]
|
||||
shl ecx, 4
|
||||
@ -1286,7 +1286,12 @@ transmit:
|
||||
adc dword [device.bytes_tx+4], 0
|
||||
|
||||
.finish:
|
||||
xor eax, eax
|
||||
ret 8
|
||||
|
||||
.error:
|
||||
stdcall KernelFree, [esp+4]
|
||||
or eax, -1
|
||||
ret 8
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user