forked from KolibriOS/kolibrios
Fixed bugs in SIS900 RX:
-Receiver MUST be re-enabled by the driver. -Driver MUST check for multiple packets at once. git-svn-id: svn://kolibrios.org@2913 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
940c0c5fa6
commit
a9f1828898
@ -1065,10 +1065,12 @@ int_handler:
|
|||||||
DEBUGF 1,"IRQ! status=%x\n", ax
|
DEBUGF 1,"IRQ! status=%x\n", ax
|
||||||
|
|
||||||
test ax, RxOK
|
test ax, RxOK
|
||||||
jz .no_rx
|
jz .no_rx_
|
||||||
|
|
||||||
push ax
|
push ax
|
||||||
|
|
||||||
|
.rx_loop:
|
||||||
|
|
||||||
;-----------
|
;-----------
|
||||||
; Get Status
|
; Get Status
|
||||||
movzx eax, [device.cur_rx] ; find current descriptor
|
movzx eax, [device.cur_rx] ; find current descriptor
|
||||||
@ -1078,12 +1080,10 @@ int_handler:
|
|||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
; Check RX_Status to see if packet is waiting
|
; Check RX_Status to see if packet is waiting
|
||||||
test ecx, 0x80000000
|
test ecx, 0x80000000
|
||||||
jnz .is_packet
|
jz .no_rx
|
||||||
ret
|
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
; There is a packet waiting check it for errors
|
; There is a packet waiting check it for errors
|
||||||
.is_packet:
|
|
||||||
test ecx, 0x67C0000 ; see if there are any errors
|
test ecx, 0x67C0000 ; see if there are any errors
|
||||||
jnz .error_status
|
jnz .error_status
|
||||||
|
|
||||||
@ -1122,9 +1122,18 @@ int_handler:
|
|||||||
inc [device.cur_rx] ; get next descriptor
|
inc [device.cur_rx] ; get next descriptor
|
||||||
and [device.cur_rx], NUM_RX_DESC-1 ; only 4 descriptors 0-3
|
and [device.cur_rx], NUM_RX_DESC-1 ; only 4 descriptors 0-3
|
||||||
|
|
||||||
pop ax
|
jmp .rx_loop
|
||||||
|
|
||||||
.no_rx:
|
.no_rx:
|
||||||
|
set_io 0
|
||||||
|
set_io cr
|
||||||
|
in eax, dx
|
||||||
|
or eax, RxENA ; Re-Enable the Receive state machine
|
||||||
|
out dx, eax
|
||||||
|
|
||||||
|
pop ax
|
||||||
|
|
||||||
|
.no_rx_:
|
||||||
test ax, TxOK
|
test ax, TxOK
|
||||||
jz .no_tx
|
jz .no_tx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user