Subversion Repositories Kolibri OS

Rev

Rev 837 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 837 Rev 914
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved.    ;;
4
;; Distributed under terms of the GNU General Public License       ;;
4
;; Distributed under terms of the GNU General Public License       ;;
5
;;                                                                 ;;
5
;;                                                                 ;;
6
;;  RTL8169.INC                                                    ;;
6
;;  RTL8169.INC                                                    ;;
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: 593 $
29
$Revision: 914 $
30
 
30
 
31
 
31
 
Line 337... Line 337...
337
align 256
337
align 256
338
rtl8169_txb rb NUM_TX_DESC * RX_BUF_SIZE
338
rtl8169_txb rb NUM_TX_DESC * RX_BUF_SIZE
Line 339... Line 339...
339
 
339
 
340
; Define the RX Descriptor
340
; Define the RX Descriptor
341
align 256
341
align 256
Line 342... Line 342...
342
rtl8169_rx_ring rb NUM_RX_DESC * sizeof.rtl8169_TxDesc
342
rtl8169_rx_ring rb NUM_RX_DESC * sizeof.rtl8169_RxDesc
343
 
343
 
344
; Create a static buffer of size RX_BUF_SZ for each
344
; Create a static buffer of size RX_BUF_SZ for each
345
; RX Descriptor   All descriptors point to a
345
; RX Descriptor   All descriptors point to a
Line 522... Line 522...
522
 
522
 
523
; Set device to be a busmaster in case BIOS neglected to do so.
523
; Set device to be a busmaster in case BIOS neglected to do so.
524
; Also adjust PCI latency timer to a reasonable value, 32.
524
; Also adjust PCI latency timer to a reasonable value, 32.
Line 525... Line 525...
525
proc adjust_pci_device
525
proc adjust_pci_device
Line 526... Line 526...
526
 
526
 
527
	DEBUGF	1,"K : adjust_pci_device\n"
527
;        DEBUGF  1,"K : adjust_pci_device\n"
528
 
528
 
529
	stdcall pci_read_config_word,PCI_COMMAND
529
	stdcall pci_read_config_word,PCI_COMMAND
530
	mov	bx,ax
530
	mov	bx,ax
531
	or	bx,PCI_COMMAND_MASTER or PCI_COMMAND_IO
531
	or	bx,PCI_COMMAND_MASTER or PCI_COMMAND_IO
532
	cmp	ax,bx
532
	cmp	ax,bx
533
	je	@f
533
	je	@f
534
	DEBUGF	1,"K : adjust_pci_device: The PCI BIOS has not enabled this device!\nK :   Updating PCI command %x->%x. pci_bus %x pci_device_fn %x\n",ax,bx,[pci_bus]:2,[pci_dev]:2
534
;        DEBUGF  1,"K : adjust_pci_device: The PCI BIOS has not enabled this device!\nK :   Updating PCI command %x->%x. pci_bus %x pci_device_fn %x\n",ax,bx,[pci_bus]:2,[pci_dev]:2
535
	stdcall pci_write_config_word,PCI_COMMAND,ebx
535
	stdcall pci_write_config_word,PCI_COMMAND,ebx
536
    @@:
536
    @@:
537
	stdcall pci_read_config_byte,PCI_LATENCY_TIMER
537
	stdcall pci_read_config_byte,PCI_LATENCY_TIMER
538
	cmp	al,32
538
	cmp	al,32
539
	jae	@f
539
	jae	@f
540
	DEBUGF	1,"K : adjust_pci_device: PCI latency timer (CFLT) is unreasonably low at %d.\nK :   Setting to 32 clocks.\n",al
540
;        DEBUGF  1,"K : adjust_pci_device: PCI latency timer (CFLT) is unreasonably low at %d.\nK :   Setting to 32 clocks.\n",al
541
	stdcall pci_write_config_byte,PCI_LATENCY_TIMER,32
541
	stdcall pci_write_config_byte,PCI_LATENCY_TIMER,32
Line 557... Line 557...
557
	mov	eax,[index]
557
	mov	eax,[index]
558
	add	eax,4
558
	add	eax,4
559
	stdcall pci_read_config_dword,eax
559
	stdcall pci_read_config_dword,eax
560
	or	eax,eax
560
	or	eax,eax
561
	jz	.not64
561
	jz	.not64
562
	DEBUGF	1,"K : pci_bar_start: Unhandled 64bit BAR\n"
562
;        DEBUGF  1,"K : pci_bar_start: Unhandled 64bit BAR\n"
563
	add	esp,4
563
	add	esp,4
564
	or	eax,-1
564
	or	eax,-1
565
	ret
565
	ret
566
  .not64:
566
  .not64:
567
	pop	eax
567
	pop	eax
Line 570... Line 570...
570
	ret
570
	ret
571
endp
571
endp
Line 572... Line 572...
572
 
572
 
Line 573... Line 573...
573
proc rtl8169_init_board
573
proc rtl8169_init_board
Line 574... Line 574...
574
 
574
 
Line 575... Line 575...
575
	DEBUGF	1,"K : rtl8169_init_board\n"
575
;        DEBUGF  1,"K : rtl8169_init_board\n"
576
 
576
 
Line 590... Line 590...
590
	loop	@b
590
	loop	@b
591
    @@:
591
    @@:
592
	; identify config method
592
	; identify config method
593
	RTL_R32 RTL8169_REG_TxConfig
593
	RTL_R32 RTL8169_REG_TxConfig
594
	and	eax,0x7c800000
594
	and	eax,0x7c800000
595
	DEBUGF	1,"K : rtl8169_init_board: TxConfig & 0x7c800000 = 0x%x\n",eax
595
;        DEBUGF  1,"K : rtl8169_init_board: TxConfig & 0x7c800000 = 0x%x\n",eax
596
	mov	esi,mac_info-8
596
	mov	esi,mac_info-8
597
    @@: add	esi,8
597
    @@: add	esi,8
598
	mov	ecx,eax
598
	mov	ecx,eax
599
	and	ecx,[esi]
599
	and	ecx,[esi]
600
	cmp	ecx,[esi]
600
	cmp	ecx,[esi]
Line 623... Line 623...
623
	jne	@b
623
	jne	@b
624
	mov	[rtl8169_tpc.chipset],ecx
624
	mov	[rtl8169_tpc.chipset],ecx
625
	jmp	.match
625
	jmp	.match
626
    @@:
626
    @@:
627
	; if unknown chip, assume array element #0, original RTL-8169 in this case
627
	; if unknown chip, assume array element #0, original RTL-8169 in this case
628
	DEBUGF	1,"K : rtl8169_init_board: PCI device: unknown chip version, assuming RTL-8169\n"
628
;        DEBUGF  1,"K : rtl8169_init_board: PCI device: unknown chip version, assuming RTL-8169\n"
629
	RTL_R32 RTL8169_REG_TxConfig
629
	RTL_R32 RTL8169_REG_TxConfig
630
	DEBUGF	1,"K : rtl8169_init_board: PCI device: TxConfig = 0x%x\n",eax
630
;        DEBUGF  1,"K : rtl8169_init_board: PCI device: TxConfig = 0x%x\n",eax
Line 631... Line 631...
631
 
631
 
Line 632... Line 632...
632
	mov	[rtl8169_tpc.chipset],0
632
	mov	[rtl8169_tpc.chipset],0
633
 
633
 
Line 640... Line 640...
640
	ret
640
	ret
641
endp
641
endp
Line 642... Line 642...
642
 
642
 
Line 643... Line 643...
643
proc rtl8169_hw_PHY_config
643
proc rtl8169_hw_PHY_config
Line 644... Line 644...
644
 
644
 
Line 645... Line 645...
645
	DEBUGF	1,"K : rtl8169_hw_PHY_config: priv.mcfg=%d, priv.pcfg=%d\n",[rtl8169_tpc.mcfg],[rtl8169_tpc.pcfg]
645
;        DEBUGF  1,"K : rtl8169_hw_PHY_config: priv.mcfg=%d, priv.pcfg=%d\n",[rtl8169_tpc.mcfg],[rtl8169_tpc.pcfg]
646
 
646
 
Line 703... Line 703...
703
	stdcall RTL8169_WRITE_GMII_REG,0x1F,0x0000
703
	stdcall RTL8169_WRITE_GMII_REG,0x1F,0x0000
704
	stdcall RTL8169_WRITE_GMII_REG,0x0B,0x0000
704
	stdcall RTL8169_WRITE_GMII_REG,0x0B,0x0000
705
	jmp	.exit
705
	jmp	.exit
706
  .not_2_or_3:
706
  .not_2_or_3:
707
;       DBG_PRINT("tpc->mcfg=%d. Discard hw PHY config.\n", tpc->mcfg);
707
;       DBG_PRINT("tpc->mcfg=%d. Discard hw PHY config.\n", tpc->mcfg);
708
	DEBUGF	1,"K :   tpc.mcfg=%d, discard hw PHY config\n",[rtl8169_tpc.mcfg]
708
;        DEBUGF  1,"K :   tpc.mcfg=%d, discard hw PHY config\n",[rtl8169_tpc.mcfg]
709
  .exit:
709
  .exit:
710
	ret
710
	ret
711
endp
711
endp
Line 712... Line 712...
712
 
712
 
713
;proc pci_write_config_byte
713
;proc pci_write_config_byte
714
;       ret
714
;       ret
Line 715... Line 715...
715
;endp
715
;endp
Line 716... Line 716...
716
 
716
 
Line 717... Line 717...
717
proc RTL8169_WRITE_GMII_REG,RegAddr:byte,value:dword
717
proc RTL8169_WRITE_GMII_REG,RegAddr:byte,value:dword
718
 
718
 
719
	DEBUGF	1,"K : RTL8169_WRITE_GMII_REG: 0x%x 0x%x\n",[RegAddr]:2,[value]
719
;;;     DEBUGF  1,"K : RTL8169_WRITE_GMII_REG: 0x%x 0x%x\n",[RegAddr]:2,[value]
720
 
720
 
721
	movzx	eax,[RegAddr]
721
	movzx	eax,[RegAddr]
722
	shl	eax,16
722
	shl	eax,16
Line 723... Line 723...
723
	or	eax,[value]
723
	or	eax,[value]
724
	or	eax,0x80000000
724
	or	eax,0x80000000
725
	RTL_W32 RTL8169_REG_PHYAR,eax
725
	RTL_W32 RTL8169_REG_PHYAR,eax
726
	stdcall udelay,1000
726
	stdcall udelay,1	;;;1000
727
 
727
 
728
	mov	ecx,2000
728
	mov	ecx,2000
729
	; Check if the RTL8169 has completed writing to the specified MII register
729
	; Check if the RTL8169 has completed writing to the specified MII register
730
    @@: RTL_R32 RTL8169_REG_PHYAR
730
    @@: RTL_R32 RTL8169_REG_PHYAR
731
	test	eax,0x80000000
731
	test	eax,0x80000000
732
	jz	.exit
732
	jz	.exit
Line 733... Line 733...
733
	stdcall udelay,100
733
	stdcall udelay,1	;;;100
Line 734... Line 734...
734
	loop	@b
734
	loop	@b
Line 735... Line 735...
735
  .exit:
735
  .exit:
736
	ret
736
	ret
737
endp
737
endp
738
 
738
 
739
proc RTL8169_READ_GMII_REG,RegAddr:byte
739
proc RTL8169_READ_GMII_REG,RegAddr:byte
740
 
740
 
Line 741... Line 741...
741
	DEBUGF	1,"K : RTL8169_READ_GMII_REG: 0x%x\n",[RegAddr]:2
741
;;;     DEBUGF  1,"K : RTL8169_READ_GMII_REG: 0x%x\n",[RegAddr]:2
742
 
742
 
743
	push	ecx
743
	push	ecx
744
	movzx	eax,[RegAddr]
744
	movzx	eax,[RegAddr]
745
	shl	eax,16
745
	shl	eax,16
746
;       or      eax,0x0
746
;       or      eax,0x0
747
	RTL_W32 RTL8169_REG_PHYAR,eax
747
	RTL_W32 RTL8169_REG_PHYAR,eax
Line 748... Line 748...
748
	stdcall udelay,1000
748
	stdcall udelay,1	;;;1000
749
 
749
 
750
	mov	ecx,2000
750
	mov	ecx,2000
Line 765... Line 765...
765
	ret
765
	ret
766
endp
766
endp
Line 767... Line 767...
767
 
767
 
Line 768... Line 768...
768
proc rtl8169_set_rx_mode
768
proc rtl8169_set_rx_mode
Line 769... Line 769...
769
 
769
 
770
	DEBUGF	1,"K : rtl8169_set_rx_mode\n"
770
;        DEBUGF  1,"K : rtl8169_set_rx_mode\n"
771
 
771
 
772
	; IFF_ALLMULTI
772
	; IFF_ALLMULTI
Line 783... Line 783...
783
	ret
783
	ret
784
endp
784
endp
Line 785... Line 785...
785
 
785
 
Line 786... Line 786...
786
proc rtl8169_init_ring
786
proc rtl8169_init_ring
Line 787... Line 787...
787
 
787
 
788
	DEBUGF	1,"K : rtl8169_init_ring\n"
788
;        DEBUGF  1,"K : rtl8169_init_ring\n"
789
 
789
 
Line 818... Line 818...
818
	mov	edi,[rtl8169_tpc.RxDescArray]
818
	mov	edi,[rtl8169_tpc.RxDescArray]
819
	mov	eax,rtl8169_rxb
819
	mov	eax,rtl8169_rxb
820
	mov	ecx,NUM_RX_DESC
820
	mov	ecx,NUM_RX_DESC
821
    @@: mov	[esi],eax
821
    @@: mov	[esi],eax
822
	mov	[edi+rtl8169_RxDesc.buf_addr],eax
822
	mov	[edi+rtl8169_RxDesc.buf_addr],eax
-
 
823
	sub	[edi+rtl8169_RxDesc.buf_addr],OS_BASE				; shurf 28.09.2008
823
	mov	[edi+rtl8169_RxDesc.status],RTL8169_DSB_OWNbit or RX_BUF_SIZE
824
	mov	[edi+rtl8169_RxDesc.status],RTL8169_DSB_OWNbit or RX_BUF_SIZE
824
	add	esi,4
825
	add	esi,4
825
	add	edi,sizeof.rtl8169_RxDesc
826
	add	edi,sizeof.rtl8169_RxDesc
826
	add	eax,RX_BUF_SIZE
827
	add	eax,RX_BUF_SIZE
827
	loop	@b
828
	loop	@b
Line 831... Line 832...
831
	ret
832
	ret
832
endp
833
endp
Line 833... Line 834...
833
 
834
 
Line 834... Line 835...
834
proc rtl8169_hw_start
835
proc rtl8169_hw_start
Line 835... Line 836...
835
 
836
 
836
	DEBUGF	1,"K : rtl8169_hw_start\n"
837
;        DEBUGF  1,"K : rtl8169_hw_start\n"
837
 
838
 
838
	; Soft reset the chip
839
	; Soft reset the chip
Line 877... Line 878...
877
;       RTL_W16 0xE2,0x152a
878
;       RTL_W16 0xE2,0x152a
878
;       RTL_W16 0xE2,0x282a
879
;       RTL_W16 0xE2,0x282a
879
	RTL_W16 0xE2,0x0000
880
	RTL_W16 0xE2,0x0000
Line 880... Line 881...
880
 
881
 
-
 
882
	MOV	[rtl8169_tpc.cur_rx],0
-
 
883
	push	eax								; shurf 28.09.2008
-
 
884
	mov	eax, [rtl8169_tpc.TxDescArray]					; shurf 28.09.2008
881
	MOV	[rtl8169_tpc.cur_rx],0
885
	sub	eax, OS_BASE							; shurf 28.09.2008
-
 
886
	RTL_W32 RTL8169_REG_TxDescStartAddr,eax ;[rtl8169_tpc.TxDescArray]      ; shurf 28.09.2008
-
 
887
	mov	eax, [rtl8169_tpc.RxDescArray]					; shurf 28.09.2008
882
	RTL_W32 RTL8169_REG_TxDescStartAddr,[rtl8169_tpc.TxDescArray]
888
	sub	eax, OS_BASE							; shurf 28.09.2008
-
 
889
	RTL_W32 RTL8169_REG_RxDescStartAddr,eax ;[rtl8169_tpc.RxDescArray]      ; shurf 28.09.2008
883
	RTL_W32 RTL8169_REG_RxDescStartAddr,[rtl8169_tpc.RxDescArray]
890
	pop	eax								; shurf 28.09.2008
884
	RTL_W8	RTL8169_REG_Cfg9346,RTL8169_CFG_9346_Lock
891
	RTL_W8	RTL8169_REG_Cfg9346,RTL8169_CFG_9346_Lock
885
	stdcall udelay,10
892
	stdcall udelay,10
886
	RTL_W32 RTL8169_REG_RxMissed,0
893
	RTL_W32 RTL8169_REG_RxMissed,0
887
	call	rtl8169_set_rx_mode
894
	call	rtl8169_set_rx_mode
Line 911... Line 918...
911
;      eax, ebx, ecx, edx
918
;      eax, ebx, ecx, edx
912
;
919
;
913
;***************************************************************************
920
;***************************************************************************
914
proc rtl8169_probe
921
proc rtl8169_probe
Line 915... Line 922...
915
 
922
 
Line 916... Line 923...
916
	DEBUGF	1,"K : rtl8169_probe: 0x%x : 0x%x 0x%x\n",[io_addr]:8,[pci_bus]:2,[pci_dev]:2
923
;        DEBUGF  1,"K : rtl8169_probe: 0x%x : 0x%x 0x%x\n",[io_addr]:8,[pci_bus]:2,[pci_dev]:2
Line 917... Line 924...
917
 
924
 
918
	call	rtl8169_init_board
925
	call	rtl8169_init_board
Line 926... Line 933...
926
	mov	[node_addr+ebx],al
933
	mov	[node_addr+ebx],al
927
	inc	edx
934
	inc	edx
928
	inc	ebx
935
	inc	ebx
929
	loop	@b
936
	loop	@b
Line 930... Line 937...
930
 
937
 
Line 931... Line 938...
931
	DEBUGF	1,"K : rtl8169_probe: MAC = %x-%x-%x-%x-%x-%x\n",[node_addr+0]:2,[node_addr+1]:2,[node_addr+2]:2,[node_addr+3]:2,[node_addr+4]:2,[node_addr+5]:2
938
;        DEBUGF  1,"K : rtl8169_probe: MAC = %x-%x-%x-%x-%x-%x\n",[node_addr+0]:2,[node_addr+1]:2,[node_addr+2]:2,[node_addr+3]:2,[node_addr+4]:2,[node_addr+5]:2
932
 
939
 
933
	; Config PHY
940
	; Config PHY
934
	stdcall rtl8169_hw_PHY_config
941
	stdcall rtl8169_hw_PHY_config
Line 986... Line 993...
986
;      eax, ebx, ecx, edx
993
;      eax, ebx, ecx, edx
987
;
994
;
988
;***************************************************************************
995
;***************************************************************************
989
proc rtl8169_reset
996
proc rtl8169_reset
Line 990... Line 997...
990
 
997
 
Line 991... Line 998...
991
	DEBUGF	1,"K : rtl8169_reset: 0x%x : 0x%x 0x%x\n",[io_addr]:8,[pci_bus]:2,[pci_dev]:2
998
;        DEBUGF  1,"K : rtl8169_reset: 0x%x : 0x%x 0x%x\n",[io_addr]:8,[pci_bus]:2,[pci_dev]:2
992
 
999
 
993
	mov	[rtl8169_tpc.TxDescArrays],rtl8169_tx_ring
1000
	mov	[rtl8169_tpc.TxDescArrays],rtl8169_tx_ring
Line 1031... Line 1038...
1031
;      eax, edx, esi, edi
1038
;      eax, edx, esi, edi
1032
;
1039
;
1033
;***************************************************************************
1040
;***************************************************************************
1034
proc rtl8169_transmit
1041
proc rtl8169_transmit
Line 1035... Line 1042...
1035
 
1042
 
Line 1036... Line 1043...
1036
	DEBUGF	1,"K : rtl8169_transmit\n" ;: 0x%x : 0x%x 0x%x 0x%x 0x%x\n",[io_addr]:8,edi,bx,ecx,esi
1043
;        DEBUGF  1,"K : rtl8169_transmit\n" ;: 0x%x : 0x%x 0x%x 0x%x 0x%x\n",[io_addr]:8,edi,bx,ecx,esi
1037
 
1044
 
1038
	push	ecx edx esi
1045
	push	ecx edx esi
1039
	mov	eax,MAX_ETH_FRAME_SIZE
1046
	mov	eax,MAX_ETH_FRAME_SIZE
Line 1085... Line 1092...
1085
	mov	eax,sizeof.rtl8169_TxDesc
1092
	mov	eax,sizeof.rtl8169_TxDesc
1086
	mul	[rtl8169_tpc.cur_tx]
1093
	mul	[rtl8169_tpc.cur_tx]
1087
	add	eax,[rtl8169_tpc.TxDescArray]
1094
	add	eax,[rtl8169_tpc.TxDescArray]
1088
	xchg	eax,ebx
1095
	xchg	eax,ebx
1089
	mov	[ebx + rtl8169_TxDesc.buf_addr],eax
1096
	mov	[ebx + rtl8169_TxDesc.buf_addr],eax
-
 
1097
	sub	[ebx + rtl8169_TxDesc.buf_addr],OS_BASE 				; shurf 28.09.2008
Line 1090... Line 1098...
1090
 
1098
 
1091
	mov	eax,ecx
1099
	mov	eax,ecx
1092
	cmp	eax,ETH_ZLEN
1100
	cmp	eax,ETH_ZLEN
1093
	jae	@f
1101
	jae	@f
Line 1108... Line 1116...
1108
	mov	ecx,TX_TIMEOUT / 10
1116
	mov	ecx,TX_TIMEOUT / 10
1109
    @@: test	[ebx + rtl8169_TxDesc.status],RTL8169_DSB_OWNbit
1117
    @@: test	[ebx + rtl8169_TxDesc.status],RTL8169_DSB_OWNbit
1110
	jnz	@f
1118
	jnz	@f
1111
	stdcall udelay,10
1119
	stdcall udelay,10
1112
	loop	@b
1120
	loop	@b
1113
	DEBUGF	1,"K : rtl8169_transmit: TX Time Out\n"
1121
;        DEBUGF  1,"K : rtl8169_transmit: TX Time Out\n"
1114
    @@:
1122
    @@:
Line 1115... Line 1123...
1115
 
1123
 
1116
	ret
1124
	ret
Line 1166... Line 1174...
1166
	and	eax,0x00001FFF
1174
	and	eax,0x00001FFF
1167
;       jz      .exit.pop
1175
;       jz      .exit.pop
1168
	add	eax,-4
1176
	add	eax,-4
1169
	mov	[eth_rx_data_len],ax
1177
	mov	[eth_rx_data_len],ax
Line 1170... Line 1178...
1170
 
1178
 
Line 1171... Line 1179...
1171
	DEBUGF	1,"K : rtl8169_poll: data length = %u\n",ax
1179
;        DEBUGF  1,"K : rtl8169_poll: data length = %u\n",ax
1172
 
1180
 
1173
	push	eax
1181
	push	eax
1174
	mov	ecx,eax
1182
	mov	ecx,eax
Line 1188... Line 1196...
1188
	jne	@f
1196
	jne	@f
1189
	or	eax,RTL8169_DSB_EORbit
1197
	or	eax,RTL8169_DSB_EORbit
1190
    @@: mov	[ebx + rtl8169_RxDesc.status],eax
1198
    @@: mov	[ebx + rtl8169_RxDesc.status],eax
Line 1191... Line 1199...
1191
 
1199
 
-
 
1200
	mov	[ebx + rtl8169_RxDesc.buf_addr],edx
1192
	mov	[ebx + rtl8169_RxDesc.buf_addr],edx
1201
	sub	[ebx + rtl8169_RxDesc.buf_addr],OS_BASE 				; shurf 28.09.2008
1193
	jmp	@f
1202
	jmp	@f
1194
  .else:
1203
  .else:
1195
	DEBUGF	1,"K : rtl8169_poll: Rx Error\n"
1204
;        DEBUGF  1,"K : rtl8169_poll: Rx Error\n"
1196
	; FIXME: shouldn't I reset the status on an error
1205
	; FIXME: shouldn't I reset the status on an error
1197
    @@:
1206
    @@:
1198
	inc	[rtl8169_tpc.cur_rx]
1207
	inc	[rtl8169_tpc.cur_rx]
1199
	and	[rtl8169_tpc.cur_rx],NUM_RX_DESC - 1
1208
	and	[rtl8169_tpc.cur_rx],NUM_RX_DESC - 1