3c59x driver fix

git-svn-id: svn://kolibrios.org@1280 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2009-11-22 15:36:45 +00:00
parent d0ea66e57f
commit d75cb497f8

View File

@ -84,46 +84,32 @@ $Revision$
macro virt_to_dma reg macro virt_to_dma reg
{ {
if defined E3C59X_LINUX sub reg, OS_BASE
sub reg, [virt_addr]
add reg, [dma_addr]
end if
} }
macro dma_to_virt reg macro dma_to_virt reg
{ {
if defined E3C59X_LINUX add reg, OS_BASE
sub reg, [dma_addr]
add reg, [virt_addr]
end if
} }
macro zero_to_virt reg macro zero_to_virt reg
{ {
if defined E3C59X_LINUX
add reg, [virt_addr]
end if
} }
macro virt_to_zero reg macro virt_to_zero reg
{ {
if defined E3C59X_LINUX
sub reg, [virt_addr]
end if
} }
macro zero_to_dma reg macro zero_to_dma reg
{ {
if defined E3C59X_LINUX sub reg, OS_BASE
add reg, [dma_addr]
end if
} }
macro dma_to_zero reg macro dma_to_zero reg
{ {
if defined E3C59X_LINUX add reg, OS_BASE
sub reg, [dma_addr]
end if
} }
macro strtbl name, [string] macro strtbl name, [string]
@ -368,6 +354,7 @@ endg
iglobal iglobal
e3c59x_ver_id: db 17 e3c59x_ver_id: db 17
endg endg
uglobal uglobal
e3c59x_full_bus_master: db 0 e3c59x_full_bus_master: db 0
e3c59x_has_hwcksm: db 0 e3c59x_has_hwcksm: db 0
@ -1567,14 +1554,15 @@ e3c59x_tx_reset:
lea edx, [ebp+E3C59X_REG_COMMAND] lea edx, [ebp+E3C59X_REG_COMMAND]
mov ax, (01011b shl 11) mov ax, (01011b shl 11)
out dx, ax out dx, ax
; wait for TxReset to complete ; Wait for TxReset to complete
mov ecx, 2000 mov ecx, 200000
.tx_reset_loop: .tx_reset_loop:
in ax, dx in ax, dx
test ah, 10000b ; check CmdInProgress test ah, 10000b ; check CmdInProgress
jz .tx_enable jz .tx_set_prev
dec ecx dec ecx
jns .tx_reset_loop jns .tx_reset_loop
.tx_set_prev:
test byte [e3c59x_full_bus_master], 0xff test byte [e3c59x_full_bus_master], 0xff
jz .tx_enable jz .tx_enable
; init last_dpd ; init last_dpd
@ -2148,7 +2136,7 @@ e3c59x_boomerang_transmit:
mov ebx, ecx mov ebx, ecx
test byte [e3c59x_has_hwcksm], 0xff test byte [e3c59x_has_hwcksm], 0xff
jz @f jz @f
or ebx, (1 shl 26) ; set AddTcpChecksum ;;; or ebx, (1 shl 26) ; set AddTcpChecksum
@@: @@:
or ebx, 0x8000 ; transmission complete notification or ebx, 0x8000 ; transmission complete notification
or ecx, 0x80000000 ; last fragment or ecx, 0x80000000 ; last fragment