forked from KolibriOS/kolibrios
Fixed i8255x ethernet driver
git-svn-id: svn://kolibrios.org@782 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b384868a4d
commit
c669e7bd89
@ -307,21 +307,6 @@ dec_003:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;***************************************************************************
|
||||
; Function
|
||||
; I8255x_reset
|
||||
; Description
|
||||
; Place the chip (ie, the ethernet card) into a virgin state
|
||||
; No inputs
|
||||
; All registers destroyed
|
||||
;
|
||||
;***************************************************************************
|
||||
I8255x_reset:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;***************************************************************************
|
||||
; Function
|
||||
; I8255x_probe
|
||||
@ -331,6 +316,7 @@ I8255x_reset:
|
||||
;
|
||||
;***************************************************************************
|
||||
I8255x_probe:
|
||||
DEBUGF 1," K : Probing i8255x device \n"
|
||||
mov eax, [io_addr]
|
||||
|
||||
mov ebx, [pci_bus]
|
||||
@ -431,9 +417,11 @@ drlp:
|
||||
mov [rxfd_command], ax
|
||||
|
||||
mov eax, rxfd_status
|
||||
sub eax, OS_BASE
|
||||
mov [rxfd_link], eax
|
||||
|
||||
mov eax, Ether_buffer
|
||||
sub eax, OS_BASE
|
||||
mov [rxfd_rx_buf_addr], eax
|
||||
|
||||
mov ax, 0
|
||||
@ -446,6 +434,7 @@ drlp:
|
||||
add edx, 4 ; SCBPointer
|
||||
|
||||
mov eax, rxfd_status
|
||||
sub eax, OS_BASE
|
||||
out dx, eax
|
||||
|
||||
mov edx, [io_addr]
|
||||
@ -468,6 +457,7 @@ drlp:
|
||||
add edx, 4 ; SCBPointer
|
||||
|
||||
mov eax, rxfd_status
|
||||
sub eax, OS_BASE
|
||||
out dx, eax
|
||||
|
||||
mov edx, [io_addr]
|
||||
@ -499,6 +489,7 @@ drlp:
|
||||
mov ax, 2
|
||||
mov [confcmd_command], ax
|
||||
mov eax, txfd
|
||||
sub eax, OS_BASE
|
||||
mov [confcmd_link], eax
|
||||
|
||||
mov ax, 1
|
||||
@ -508,8 +499,11 @@ drlp:
|
||||
mov [txfd_status], ax
|
||||
|
||||
mov eax, confcmd
|
||||
sub eax, OS_BASE
|
||||
mov [txfd_link], eax
|
||||
|
||||
|
||||
|
||||
; ETH_ALEN is 6 bytes
|
||||
|
||||
mov esi, eeprom_data
|
||||
@ -543,6 +537,7 @@ drp001:
|
||||
add esi, 4
|
||||
loop drp001
|
||||
|
||||
|
||||
mov esi, eeprom_data + (6 * 4)
|
||||
mov eax, [esi]
|
||||
shr eax, 8
|
||||
@ -587,6 +582,7 @@ drp003:
|
||||
mov [ebx + 21], al
|
||||
|
||||
mov eax, txfd
|
||||
sub eax, OS_BASE
|
||||
mov edx, [io_addr]
|
||||
add edx, 4 ; SCBPointer
|
||||
out dx, eax
|
||||
@ -615,6 +611,20 @@ I8255x_exit:
|
||||
|
||||
|
||||
|
||||
;***************************************************************************
|
||||
; Function
|
||||
; I8255x_reset
|
||||
; Description
|
||||
; Place the chip (ie, the ethernet card) into a virgin state
|
||||
; No inputs
|
||||
; All registers destroyed
|
||||
;
|
||||
;***************************************************************************
|
||||
I8255x_reset:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;***************************************************************************
|
||||
; Function
|
||||
; I8255x_poll
|
||||
@ -642,6 +652,7 @@ I8255x_poll:
|
||||
add edx, 4 ; SCBPointer
|
||||
|
||||
mov eax, rxfd_status
|
||||
sub eax, OS_BASE
|
||||
out dx, eax
|
||||
|
||||
mov edx, [io_addr]
|
||||
@ -707,19 +718,23 @@ I8255x_transmit:
|
||||
mov eax, 0x02208000
|
||||
mov [txfd_count], eax
|
||||
mov eax, txfd_tx_buf_addr0
|
||||
sub eax, OS_BASE
|
||||
mov [txfd_tx_desc_addr], eax
|
||||
mov eax, hdr
|
||||
sub eax, OS_BASE
|
||||
mov [txfd_tx_buf_addr0], eax
|
||||
mov eax, 14 ; sizeof hdr
|
||||
mov [txfd_tx_buf_size0], eax
|
||||
|
||||
; Copy the buffer address and size in
|
||||
mov eax, esi
|
||||
sub eax, OS_BASE
|
||||
mov [txfd_tx_buf_addr1], eax
|
||||
mov eax, ecx
|
||||
mov [txfd_tx_buf_size1], eax
|
||||
|
||||
mov eax, txfd
|
||||
sub eax, OS_BASE
|
||||
mov edx, [io_addr]
|
||||
add edx, 4 ; SCBPointer
|
||||
out dx, eax
|
||||
|
Loading…
Reference in New Issue
Block a user