mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
port: report link role and negotiated pause per port
Two per-port MAC status registers that nothing in the firmware reads: 0x6408 says which end is master on a BASE-T link, 0x63FC and 0x6400 say whether pause was negotiated in each direction. port <n> show prints both at the end. The read sits in rtl837x_port.c rather than phy_show(), because these are MAC registers and phy_show() is skipped for SFP ports. Master/slave keys off machine.is_sfp[] so it stays off the fibre ports, where the notion does not apply. Bit N of each register is chip port N, which is not how RTL837X_REG_LINKS_STS indexes its bytes a few lines above in the same header.
This commit is contained in:
1 parent
55431b39f6
commit
340fdd97e5
4 files changed
+40
No files matched your search
@@ -83,6 +83,10 @@
|
||||
#define RTL837X_REG_LINKS 0x63f0
|
||||
#define RTL837X_REG_LINKS_89 0x63f4
|
||||
#define RTL837X_REG_LINKS_STS 0x63E8
|
||||
/* Per-port status bits: bit N is chip port N */
|
||||
#define RTL837X_MAC_TX_PAUSE_STS 0x63FC
|
||||
#define RTL837X_MAC_RX_PAUSE_STS 0x6400
|
||||
#define RTL837X_MAC_MSTR_SLV_STS 0x6408
|
||||
|
||||
/* Each nibble encodes the link state of a port.
|
||||
Port 0 appears to be the CPU port
|
||||
|
||||
Reference in new issue
Block a user