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:
hidnplayr 2012-08-08 10:21:59 +00:00
parent 940c0c5fa6
commit a9f1828898

View File

@ -1065,10 +1065,12 @@ int_handler:
DEBUGF 1,"IRQ! status=%x\n", ax
test ax, RxOK
jz .no_rx
jz .no_rx_
push ax
.rx_loop:
;-----------
; Get Status
movzx eax, [device.cur_rx] ; find current descriptor
@ -1078,12 +1080,10 @@ int_handler:
;-------------------------------------------
; Check RX_Status to see if packet is waiting
test ecx, 0x80000000
jnz .is_packet
ret
jz .no_rx
;----------------------------------------------
; There is a packet waiting check it for errors
.is_packet:
test ecx, 0x67C0000 ; see if there are any errors
jnz .error_status
@ -1122,9 +1122,18 @@ int_handler:
inc [device.cur_rx] ; get next descriptor
and [device.cur_rx], NUM_RX_DESC-1 ; only 4 descriptors 0-3
pop ax
jmp .rx_loop
.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
jz .no_tx