Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message for "net: phy: broadcom: Wire-up cable tests
for BCM54210E" is cut off and leaves out what the patch actually…
--
net: phy: broadcom: Wire-up cable tests for BCM54210E
This commit enables cable diagnostics on the BCM54210E PHY. It sets
PHY_POLL_CABLE_TEST and adds bcm54xx_cable_test_start() and
bcm54xx_cable_test_get_status(). These wrappers turn off auto power-down
while the ECD test runs and restore it afterwards.
> Wire up the cable diagnostics now that we have implemented the cable
> test feature, this was verified with a Raspberry Pi 4B using a BCM54210E
> PHY:
>
> Signed-off-by: Florian Fainelli <flor…@broadcom.com>
[Severity: Low]
This isn't a bug, but the commit message looks cut off. It ends with
"using a BCM54210E PHY:" and then goes straight to the Signed-off-by. Was
the verification output, for example the ethtool --cable-test results,
meant to go after that colon?
The message also says the patch only wires up existing helpers. It
actually adds two wrappers in drivers/net/phy/broadcom.c that change the
PHY power management state during the test.
bcm54xx_cable_test_start() clears BCM54XX_SHD_APD_EN before it starts ECD:
/* The ECD run never finishes on a line without energy while auto
* power-down is enabled.
*/
val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_APD);
...
ret = bcm_phy_write_shadow(phydev, BCM54XX_SHD_APD,
val & ~BCM54XX_SHD_APD_EN);
The SCR3 and APD shadow registers are then rewritten through
bcm54xx_adjust_rxrefclk() in two places:
- in bcm54xx_cable_test_start(), when bcm_phy_cable_test_start() fails
- in bcm54xx_cable_test_get_status(), once the test finishes
Could the commit message describe this auto power-down workaround and the
reason for it? Right now the code comment is the only record of it.
Also, PHY_ID_MATCH_MODEL(PHY_ID_BCM54210E) masks the revision nibble. That
means cable test is enabled for every PHY matching this model ID. This
includes the Raspberry Pi 4B PHY, which is usually called a BCM54213PE.
Could the message say so?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40broadcom.com