Make sure port is not called for an SFP module

This commit is contained in:
logicog
2025-12-14 12:17:53 +01:00
parent 0197c9b6cf
commit b41452026f
2 changed files with 4 additions and 1 deletions
+4
View File
@@ -415,6 +415,10 @@ void parse_port(void)
uint8_t p = cmd_buffer[cmd_words_b[1]] - '1'; uint8_t p = cmd_buffer[cmd_words_b[1]] - '1';
p = machine.phys_to_log_port[p]; p = machine.phys_to_log_port[p];
print_byte(p); print_byte(p);
if (machine.is_sfp[p]) {
print_string(" is SFP no PHY information available.\n");
return;
}
if (cmd_words_b[2] > 0 && cmd_compare(2, "10m")) { if (cmd_words_b[2] > 0 && cmd_compare(2, "10m")) {
print_string(" 10M\n"); print_string(" 10M\n");
phy_set_speed(p, PHY_SPEED_10M); phy_set_speed(p, PHY_SPEED_10M);
-1
View File
@@ -290,7 +290,6 @@ void phy_show(uint8_t port) __banked
print_string("\nForced speed: "); print_short(v); write_char('\n'); print_string("\nForced speed: "); print_short(v); write_char('\n');
uint8_t s1 = ((v & 0x40) ? 0x2 : 0x0) | ((v & 0x2000) ? 0x1 : 0x0); uint8_t s1 = ((v & 0x40) ? 0x2 : 0x0) | ((v & 0x2000) ? 0x1 : 0x0);
uint8_t s2 = (v >> 2) & 0xf; uint8_t s2 = (v >> 2) & 0xf;
print_string("s1, s2: "); print_byte(s1); write_char(' '); print_byte(s2); write_char('\n');
switch(s1) { switch(s1) {
case 0: case 0:
print_string("10M\n"); print_string("10M\n");