Follow-up to viewtopic.php?p=1958998
The ethernet PHY on the RPI4 and 5 is apparently the BCM54213PE. The datasheet for this part claims:
"The BCM54213PE features CableChecker™ diagnostics, which detects common cable problems including shorts, opens, and cable length."
See: https://www.broadcom.com/products/ether ... bcm54213pe
I understand features like these are not encoded into any standards document, but detecting and reporting shorts/opens and cable length (Time Domain Reflectometry) are not entirely uncommon features in ethernet chips. But not found in any cheap or compact device, as far as I can tell.
ethtool has a 'standardized' way to make use of cable testing facilities in linux. (Kudos to Andrew Lunn.)And it appears Broadcom actually has written code for this feature in the common Broadcom phy library. (bcm-phy-lib.c/h)
Sadly, these functions do not appear to be enabled for any of the devices supported by broadcom.c. And the very naive approach to enable this feature for the 54213 does not provide a result. (See below).
Three questions:
1. Does the BCM54213PE as implemented (hardware-wise) in the RPI4 and 5 allow for this function to be utilized by ethtool, given driver support?
2. If not, is this a hardware or firmware limitation?
3. If yes, is the Raspberry Pi organization in a position to make the required software changes happen?
Being able to utilize a Pi to troubleshoot networking issues at layer 1 would be very, very satisfying.
The ethernet PHY on the RPI4 and 5 is apparently the BCM54213PE. The datasheet for this part claims:
"The BCM54213PE features CableChecker™ diagnostics, which detects common cable problems including shorts, opens, and cable length."
See: https://www.broadcom.com/products/ether ... bcm54213pe
I understand features like these are not encoded into any standards document, but detecting and reporting shorts/opens and cable length (Time Domain Reflectometry) are not entirely uncommon features in ethernet chips. But not found in any cheap or compact device, as far as I can tell.
ethtool has a 'standardized' way to make use of cable testing facilities in linux. (Kudos to Andrew Lunn.)
Code:
ethtool --monitor Show kernel notifications ( [ --all ].... | --cable-test | --cable-test-tdr.... [ DEVNAME | * ]
Sadly, these functions do not appear to be enabled for any of the devices supported by broadcom.c. And the very naive approach to enable this feature for the 54213 does not provide a result. (See below).
Three questions:
1. Does the BCM54213PE as implemented (hardware-wise) in the RPI4 and 5 allow for this function to be utilized by ethtool, given driver support?
2. If not, is this a hardware or firmware limitation?
3. If yes, is the Raspberry Pi organization in a position to make the required software changes happen?
Being able to utilize a Pi to troubleshoot networking issues at layer 1 would be very, very satisfying.
Code:
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.cindex 5a24dadba..d1c9ba9a8 100644--- a/drivers/net/phy/broadcom.c+++ b/drivers/net/phy/broadcom.c@@ -944,10 +944,14 @@ static struct phy_driver broadcom_drivers[] = { .get_strings = bcm_phy_get_strings, .get_stats = bcm54xx_get_stats, .probe = bcm54xx_phy_probe,+ .flags = PHY_POLL_CABLE_TEST,+ .features = PHY_GBIT_FEATURES, .config_init = bcm54xx_config_init, .config_intr = bcm_phy_config_intr, .suspend = bcm54xx_suspend, .resume = bcm54xx_resume,+ .cable_test_start = bcm_phy_cable_test_start_rdb,+ .cable_test_get_status = bcm_phy_cable_test_get_status_rdb, }, { .phy_id = PHY_ID_BCM5461, .phy_id_mask = 0xfffffff0,
Statistics: Posted by dagb — Mon Feb 19, 2024 8:10 pm — Replies 0 — Views 37