Rev 1194 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1194 | Rev 2288 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | ;; ;; |
24 | ;; ;; |
25 | ;; See file COPYING for details ;; |
25 | ;; See file COPYING for details ;; |
26 | ;; ;; |
26 | ;; ;; |
27 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
27 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 28... | Line 28... | ||
28 | 28 | ||
Line 29... | Line 29... | ||
29 | $Revision: 1194 $ |
29 | $Revision: 2288 $ |
30 | 30 | ||
31 | ;******************************************************************** |
31 | ;******************************************************************** |
32 | ; Interface |
32 | ; Interface |
Line 817... | Line 817... | ||
817 | call pci_read_reg |
817 | call pci_read_reg |
818 | test eax, PCI_BASE_ADDRESS_SPACE_IO |
818 | test eax, PCI_BASE_ADDRESS_SPACE_IO |
819 | jz @f |
819 | jz @f |
820 | and eax, PCI_BASE_ADDRESS_IO_MASK |
820 | and eax, PCI_BASE_ADDRESS_IO_MASK |
821 | jmp .next |
821 | jmp .next |
- | 822 | @@: |
|
822 | @@: push eax |
823 | push eax |
823 | and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK |
824 | and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK |
824 | cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64 |
825 | cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64 |
825 | jne .not64 |
826 | jne .not64 |
826 | mov al, 2 ; dword |
827 | mov al, 2 ; dword |
827 | mov bh, [pci_dev] |
828 | mov bh, [pci_dev] |
Line 876... | Line 877... | ||
876 | pop eax |
877 | pop eax |
877 | test dword [forcedeth_tmp_start], PCI_BASE_ADDRESS_SPACE_IO |
878 | test dword [forcedeth_tmp_start], PCI_BASE_ADDRESS_SPACE_IO |
878 | jz @f |
879 | jz @f |
879 | and eax, PCI_BASE_ADDRESS_IO_MASK |
880 | and eax, PCI_BASE_ADDRESS_IO_MASK |
880 | jmp .next2 |
881 | jmp .next2 |
- | 882 | @@: |
|
881 | @@: and eax, PCI_BASE_ADDRESS_MEM_MASK |
883 | and eax, PCI_BASE_ADDRESS_MEM_MASK |
882 | .next2: |
884 | .next2: |
883 | ; Find the lowest bit set |
885 | ; Find the lowest bit set |
884 | mov ecx, eax |
886 | mov ecx, eax |
885 | sub eax, 1 |
887 | sub eax, 1 |
886 | not eax |
888 | not eax |
Line 911... | Line 913... | ||
911 | je .ver1 |
913 | je .ver1 |
912 | cmp eax, PCI_DEVICE_ID_NVIDIA_NVENET_3 |
914 | cmp eax, PCI_DEVICE_ID_NVIDIA_NVENET_3 |
913 | je .ver1 |
915 | je .ver1 |
914 | mov dword [forcedeth_desc_ver], DESC_VER_2 |
916 | mov dword [forcedeth_desc_ver], DESC_VER_2 |
915 | jmp @f |
917 | jmp @f |
- | 918 | .ver1: |
|
916 | .ver1: mov dword [forcedeth_desc_ver], DESC_VER_1 |
919 | mov dword [forcedeth_desc_ver], DESC_VER_1 |
917 | @@: |
920 | @@: |
918 | ; read the mac address |
921 | ; read the mac address |
919 | ; map memory |
922 | ; map memory |
920 | stdcall map_io_mem, [forcedeth_mmio_addr], [forcedeth_mmio_size], (PG_SW+PG_NOCACHE) |
923 | stdcall map_io_mem, [forcedeth_mmio_addr], [forcedeth_mmio_size], (PG_SW+PG_NOCACHE) |
921 | test eax, eax |
924 | test eax, eax |
Line 979... | Line 982... | ||
979 | mov dword [forcedeth_irqmask], 0 ;;;;;;;;;;;;;;;;(NVREG_IRQMASK_WANTED_2 or NVREG_IRQ_TIMER) |
982 | mov dword [forcedeth_irqmask], 0 ;;;;;;;;;;;;;;;;(NVREG_IRQMASK_WANTED_2 or NVREG_IRQ_TIMER) |
980 | cmp dword [forcedeth_desc_ver], DESC_VER_1 |
983 | cmp dword [forcedeth_desc_ver], DESC_VER_1 |
981 | jne @f |
984 | jne @f |
982 | or dword [forcedeth_txflags], NV_TX_LASTPACKET1 |
985 | or dword [forcedeth_txflags], NV_TX_LASTPACKET1 |
983 | jmp .end_switch |
986 | jmp .end_switch |
- | 987 | @@: |
|
984 | @@: or dword [forcedeth_txflags], NV_TX2_LASTPACKET1 |
988 | or dword [forcedeth_txflags], NV_TX2_LASTPACKET1 |
985 | jmp .end_switch |
989 | jmp .end_switch |
Line 986... | Line 990... | ||
986 | 990 | ||
987 | .next_0x0086: |
991 | .next_0x0086: |
988 | cmp word [forcedeth_device_id], 0x0086 |
992 | cmp word [forcedeth_device_id], 0x0086 |