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
@@ -893,7 +893,10 @@ void parse_port(void)
|
||||
print_string_x(port_names[phy_settings.port]);
|
||||
if (!machine.is_sfp[phy_settings.port]) {
|
||||
phy_show(phy_settings.port);
|
||||
} else {
|
||||
write_char('\n');
|
||||
}
|
||||
port_media_show(phy_settings.port);
|
||||
} else if (cmd_compare(2, "name")) {
|
||||
uint8_t i = 0;
|
||||
while ( (i < PORT_NAME_SIZE-1) && (cmd_buffer[cmd_words_b[3] + i] != NUL) ) {
|
||||
|
||||
Reference in new issue
Block a user