Subversion Repositories Kolibri OS

Rev

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

Rev 5522 Rev 9149
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2021. 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
;;  MTD80x driver for KolibriOS                                    ;;
6
;;  MTD80x driver for KolibriOS                                    ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  Based on mtd80x.c from the etherboot project                   ;;
8
;;  Based on mtd80x.c from the etherboot project                   ;;
Line 822... Line 822...
822
        set_io  [ebx + device.io_addr], TCRRCR
822
        set_io  [ebx + device.io_addr], TCRRCR
823
        in      eax, dx
823
        in      eax, dx
824
        test    eax, FD
824
        test    eax, FD
825
        jz      @f
825
        jz      @f
826
        DEBUGF  1,"full duplex\n"
826
        DEBUGF  1,"full duplex\n"
827
        or      [ebx + device.state], ETH_LINK_FD
827
        or      [ebx + device.state], ETH_LINK_FULL_DUPLEX
828
       @@:
828
       @@:
829
        test    eax, PS10
829
        test    eax, PS10
830
        jnz     @f
830
        jnz     @f
831
        DEBUGF  1,"100mbit\n"
831
        DEBUGF  1,"100Mbit\n"
832
        or      [ebx + device.state], ETH_LINK_100M
832
        or      [ebx + device.state], ETH_LINK_SPEED_100M
833
        ret
833
        ret
834
       @@:
834
       @@:
835
        DEBUGF  1,"10mbit\n"
835
        DEBUGF  1,"10Mbit\n"
836
        or      [ebx + device.state], ETH_LINK_10M
836
        or      [ebx + device.state], ETH_LINK_SPEED_10M
837
        ret
837
        ret
Line 838... Line 838...
838
 
838
 
839
  .no_myson_phy:
839
  .no_myson_phy:
840
        DEBUGF  1,"not a myson PHY\n"
840
        DEBUGF  1,"not a myson PHY\n"