Subversion Repositories Kolibri OS

Rev

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

Rev 9157 Rev 9751
Line 508... Line 508...
508
        io_addr         dd ?
508
        io_addr         dd ?
509
        pci_dev         dd ?
509
        pci_dev         dd ?
510
        pci_bus         dd ?
510
        pci_bus         dd ?
511
        revision        db ?
511
        revision        db ?
512
        irq_line        db ?
512
        irq_line        db ?
-
 
513
        chip_vid        dw ?
513
        chip_id         dw ?
514
        chip_did        dw ?
Line 514... Line 515...
514
 
515
 
515
        cur_rx          dw ?
516
        cur_rx          dw ?
516
        cur_tx          dw ?
517
        cur_tx          dw ?
Line 704... Line 705...
704
        invoke  PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.command
705
        invoke  PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.command
705
        or      al, PCI_CMD_MASTER
706
        or      al, PCI_CMD_MASTER
706
        invoke  PciWrite32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.command, eax
707
        invoke  PciWrite32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.command, eax
Line 707... Line 708...
707
 
708
 
708
; get device id
709
; get device id
709
        invoke  PciRead16, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.device_id
710
        invoke  PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header00.vendor_id
Line 710... Line 711...
710
        mov     [ebx + device.chip_id], ax
711
        mov     dword[ebx + device.chip_vid], eax
711
 
712
 
712
        mov     esi, chiplist
713
        mov     esi, chiplist
713
  .loop:
714
  .loop:
714
        cmp     word[esi+2], ax
715
        cmp     dword[esi], eax
715
        je      .got_it
716
        je      .got_it
716
        add     esi, 8
717
        add     esi, 2*4
717
        cmp     esi, chiplist + 6*8
718
        cmp     dword[esi], 0
-
 
719
        jne     .loop
718
        jbe     .loop
720
        DEBUGF  2, "Unknown chip: 0x%x, continuing anyway\n", eax
719
        DEBUGF  2, "Unknown chip: 0x%x, continuing anyway\n", ax
721
        mov     [ebx + device.name], my_service
720
        jmp     .done
722
        jmp     .done
721
  .got_it:
723
  .got_it:
722
        mov     eax, dword[esi+4]
724
        mov     eax, dword[esi+4]
Line 733... Line 735...
733
 
735
 
734
; D-Link provided reset code (with comment additions)
736
; D-Link provided reset code (with comment additions)
735
        cmp     al, 0x40
737
        cmp     al, 0x40
Line 736... Line 738...
736
        jb      .below_x40
738
        jb      .below_x40
737
 
739
 
Line 738... Line 740...
738
        mov     ax, [ebx + device.chip_id]
740
        mov     ax, [ebx + device.chip_did]
739
        DEBUGF  1, "Enabling Sticky Bit Workaround for Chip_id: 0x%x\n", ax
741
        DEBUGF  1, "Enabling Sticky Bit Workaround for Chip_id: 0x%x\n", ax
740
 
742
 
Line 890... Line 892...
890
    .halfduplex:
892
    .halfduplex:
891
        DEBUGF  1, "Halfduplex\n"
893
        DEBUGF  1, "Halfduplex\n"
892
    @@:
894
    @@:
Line 893... Line 895...
893
 
895
 
894
; set MII 10 FULL ON, only apply in vt3043
896
; set MII 10 FULL ON, only apply in vt3043
895
        cmp     [ebx + device.chip_id], 0x3043
897
        cmp     [ebx + device.chip_did], 0x3043
896
        jne     @f
898
        jne     @f
897
        stdcall WriteMII, 0x17, 1 shl 1, 1
899
        stdcall WriteMII, 0x17, 1 shl 1, 1
Line 898... Line 900...
898
    @@:
900
    @@: