Rev 5527 | Rev 7250 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5527 | Rev 5588 | ||
---|---|---|---|
Line 653... | Line 653... | ||
653 | 653 | ||
654 | mov dword[esi + REG_IMS], 0x1F6DC ; Enable interrupt types |
654 | mov dword[esi + REG_IMS], 0x1F6DC ; Enable interrupt types |
Line 655... | Line 655... | ||
655 | mov eax, [esi + REG_ICR] ; Clear pending interrupts |
655 | mov eax, [esi + REG_ICR] ; Clear pending interrupts |
656 | 656 | ||
Line 657... | Line 657... | ||
657 | mov [ebx + device.mtu], 1514 |
657 | mov [ebx + device.mtu], 1514 |
658 | mov [ebx + device.state], ETH_LINK_UNKNOWN ; Set link state to unknown |
658 | call link_status |
Line 702... | Line 702... | ||
702 | [ebx + device.mac+3]:2,[ebx + device.mac+4]:2,[ebx + device.mac+5]:2 |
702 | [ebx + device.mac+3]:2,[ebx + device.mac+4]:2,[ebx + device.mac+5]:2 |
Line 703... | Line 703... | ||
703 | 703 | ||
Line -... | Line 704... | ||
- | 704 | ret |
|
- | 705 | ||
- | 706 | ||
- | 707 | link_status: |
|
- | 708 | ||
- | 709 | DEBUGF 1,"Verifying link status\n" |
|
- | 710 | ||
- | 711 | xor ecx, ecx ; ETH_LINK_DOWN |
|
- | 712 | mov esi, [ebx + device.mmio_addr] |
|
- | 713 | mov eax, [esi + REG_STATUS] |
|
- | 714 | test eax, STATUS_LU |
|
- | 715 | jz .ok |
|
- | 716 | ||
- | 717 | test eax, STATUS_FD |
|
- | 718 | jz @f |
|
- | 719 | or cl, ETH_LINK_FD |
|
- | 720 | @@: |
|
- | 721 | shr eax, STATUS_SPEED_SHIFT |
|
- | 722 | and al, 3 |
|
- | 723 | test al, al |
|
- | 724 | jnz @f |
|
- | 725 | or cl, ETH_LINK_10M |
|
- | 726 | jmp .ok |
|
- | 727 | @@: |
|
- | 728 | cmp al, 1 |
|
- | 729 | jne @f |
|
- | 730 | or cl, ETH_LINK_100M |
|
- | 731 | jmp .ok |
|
- | 732 | @@: |
|
- | 733 | or cl, ETH_LINK_1G |
|
- | 734 | ; jmp .ok |
|
- | 735 | ||
- | 736 | .ok: |
|
- | 737 | mov [ebx + device.state], ecx |
|
- | 738 | invoke NetLinkChanged |
|
704 | ret |
739 | ret |
705 | 740 | ||
706 | 741 | ||
707 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
742 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
708 | ;; ;; |
743 | ;; ;; |
Line 889... | Line 924... | ||
889 | test eax, ICR_LSC |
924 | test eax, ICR_LSC |
890 | jz .no_link |
925 | jz .no_link |
Line 891... | Line 926... | ||
891 | 926 | ||
Line -... | Line 927... | ||
- | 927 | DEBUGF 2,"Link Changed\n" |
|
- | 928 | ||
892 | DEBUGF 2,"Link Changed\n" |
929 | call link_status |
Line 893... | Line 930... | ||
893 | 930 | ||
894 | .no_link: |
931 | .no_link: |