Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4803 → Rev 4802

/drivers/ethernet/RTL8169.asm
287,10 → 287,10
 
macro udelay msec {
 
push esi ecx
push esi
mov esi, msec
call Sleep
pop ecx esi
pop esi
 
}
 
648,7 → 648,6
cmp [tpc.mcfg], MCFG_METHOD_02
jne @f
DEBUGF 1,"Set MAC Reg C+CR Offset 0x82h = 0x01h\n"
set_io 0
set_io 0x82
mov al, 0x01
out dx, al
674,15 → 673,14
; Enable auto-negotiation and restart auto-nigotiation
WRITE_GMII_REG PHY_CTRL_REG, PHY_Enable_Auto_Nego or PHY_Restart_Auto_Nego
 
udelay 1 ; 100
mov ecx, 200 ; 10000
DEBUGF 1, "Waiting for auto-negotiation to complete\n"
udelay 100
mov ecx, 10000
; wait for auto-negotiation process
@@: dec ecx
jz @f
set_io 0
READ_GMII_REG PHY_STAT_REG
udelay 1 ; 100
udelay 100
test eax, PHY_Auto_Neco_Comp
jz @b
set_io REG_PHYstatus
689,10 → 687,10
in al, dx
jmp @f
.tbi_dis:
udelay 1 ; 100
udelay 100
@@:
DEBUGF 1, "auto-negotiation complete\n"
 
 
;***************************************************************************
; Function
; rt8169_reset
705,7 → 703,7
align 4
reset:
 
DEBUGF 1,"resetting\n"
DEBUGF 1,"reset\n"
 
lea eax, [device.tx_ring]
mov [tpc.TxDescArrays], eax
730,7 → 728,6
; Set link state to unknown
mov [device.state], ETH_LINK_UNKOWN
 
DEBUGF 2,"init OK!\n"
xor eax, eax
ret