AR81xx: Bugfixes (now also works on non-gigabit devices such as QCA8172), refactoring.

git-svn-id: svn://kolibrios.org@9146 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2021-08-22 20:18:00 +00:00
parent eb103eed40
commit 8822960988
4 changed files with 612 additions and 362 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,11 +9,8 @@ ALX_DEV_ID_AR8162 = 0x1090
ALX_DEV_ID_AR8171 = 0x10A1
ALX_DEV_ID_AR8172 = 0x10A0
; rev definition,
; bit0: with xD support
; bit1: with Card Reader function
; bit(7:2): real revision
ALX_PCI_REVID_WITH_XD = 1 shl 0
ALX_PCI_REVID_WITH_CR = 1 shl 1 ; With Card Reader
ALX_PCI_REVID_SHIFT = 3
ALX_REV_A0 = 0
ALX_REV_A1 = 1
@ -93,8 +90,10 @@ ALX_MASTER_DMA_MAC_RST = (1 shl 0)
ALX_DMA_MAC_RST_TO = 50
ALX_IRQ_MODU_TIMER = 0x1408
ALX_IRQ_MODU_TIMER1_MASK = 0xFFFF
ALX_IRQ_MODU_TIMER1_MASK = 0x0000FFFF
ALX_IRQ_MODU_TIMER1_SHIFT = 0
ALX_IRQ_MODU_TIMER2_MASK = 0xFFFF0000
ALX_IRQ_MODU_TIMER2_SHIFT = 16
ALX_PHY_CTRL = 0x140C
ALX_PHY_CTRL_100AB_EN = (1 shl 17)

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
@ -35,6 +35,15 @@ include 'mii.inc'
ETH_LINK_DOWN = 0 ; Link is down
ETH_LINK_UNKNOWN = 1b ; There could be an active link
ETH_LINK_FULL_DUPLEX = 10b ; full duplex flag
ETH_LINK_SPEED_10M = 100b ; 10 Mbit
ETH_LINK_SPEED_100M = 1000b ; 100 Mbit
ETH_LINK_SPEED_1G = 1100b ; Gigabit
ETH_LINK_SPEED_MASK = 1100b
; Deprecated naming - dont use
ETH_LINK_FD = 10b ; full duplex flag
ETH_LINK_10M = 100b ; 10 mbit
ETH_LINK_100M = 1000b ; 100 mbit

View File

@ -242,11 +242,12 @@ dd 0x0
db 'AR81XX', 0
;dd 0x10911969 ; AR8161 - untested
dd 0x10631969 ; AR8131
dd 0x10911969 ; AR8161
dd 0x10901969 ; AR8162
dd 0x10A11969 ; QCA8171 (AR8171)
dd 0x10A01969 ; QCA8172 (AR8172)
;dd 0xe0911969 ; E2200 - untested
;dd 0x10901969 ; AR8162 - untested
dd 0x10A11969 ; AR8171
;dd 0x10A01969 ; AR8172 - untested
dd 0x0
dd 0x0 ; driverlist end