mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Detect 2nd SFP-slot RX-Los on KP-9000-6XHML-2X
This commit is contained in:
+12
-1
@@ -950,7 +950,7 @@ void handle_sfp(void)
|
|||||||
sfp_pins_last |= 0x02;
|
sfp_pins_last |= 0x02;
|
||||||
print_string("\n<SFP-RX LOS>\n");
|
print_string("\n<SFP-RX LOS>\n");
|
||||||
}
|
}
|
||||||
|
#if NSFP == 2
|
||||||
reg_read_m(RTL837X_REG_GPIO_32_63_INPUT);
|
reg_read_m(RTL837X_REG_GPIO_32_63_INPUT);
|
||||||
if ((sfp_pins_last & 0x10) && (!(sfr_data[1] & 0x04))) {
|
if ((sfp_pins_last & 0x10) && (!(sfr_data[1] & 0x04))) {
|
||||||
sfp_pins_last &= ~0x10;
|
sfp_pins_last &= ~0x10;
|
||||||
@@ -969,6 +969,17 @@ void handle_sfp(void)
|
|||||||
sfp_pins_last |= 0x10;
|
sfp_pins_last |= 0x10;
|
||||||
print_string("\n<MODULE 2 REMOVED>\n");
|
print_string("\n<MODULE 2 REMOVED>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reg_read_m(RTL837X_REG_GPIO_00_31_INPUT);
|
||||||
|
if ((sfp_pins_last & 0x20) && (!(sfr_data[2] & 0x08))) {
|
||||||
|
sfp_pins_last &= ~0x20;
|
||||||
|
print_string("\n<SFP2-RX OK>\n");
|
||||||
|
}
|
||||||
|
if ((!(sfp_pins_last & 0x20)) && (sfr_data[2] & 0x08)) {
|
||||||
|
sfp_pins_last |= 0x20;
|
||||||
|
print_string("\n<SFP2-RX LOS>\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user