oatc14_updat...i_capability(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… oatc14_update_sqi_capability โ€” the Kernel API Manual, bestie edition ๐ŸŽ€

okay so real talk, we're in the Kernel API Manual today (section 9, iykyk) and the star of the show is oatc14_update_sqi_capability. yes the name is a mouthful, no we're not shortening it, she earned that name ๐Ÿ’–


โœจ NAME โœจ

oatc14_update_sqi_capability โ€” reads the OATC14 10Base-T1S PHY SQI/SQI+ capability and updates it. literally her whole job ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

int oatc14_update_sqi_capability (struct phy_device *phydev );

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • phydev โ€” a pointer to the PHY device structure. yes queen, hand her the struct phy_device * and she'll take it from there ๐Ÿซถ

๐Ÿ’… DESCRIPTION ๐Ÿ’…

so this little helper goes and reads the OATC14 ADFCAP capability register, right? because we need to know whether this PHY actually supports SQI or SQI+ reporting. vibe check on the hardware, basically โœจ

SQI+ gets checked first โ€” she's the main character here ๐Ÿ‘‘. The SQI+ field tells you the number of valid MSBs, and that's a range of 3โ€“8, which maps out to 8โ€“256 SQI+ levels. When SQI+ is present, the function stores the number of SQI+ bits and computes the max SQI+ value as (2^bits - 1). math slay ๐Ÿงฎ

If SQI+ is not supported, she moves on and checks for the basic SQI capability instead, which gives you 0โ€“7 SQI levels. still cute, still valid ๐Ÿ’œ

On success, all that capability info gets stored into phydev->oatc14_sqi_capability and gets marked as updated. periodt โœ…


๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

  • 0 โ€” capability successfully read and stored, we love a win ๐Ÿ’–
  • -EOPNOTSUPP โ€” SQI/SQI+ is simply not supported by this PHY ๐Ÿ˜ญ not her fault
  • Negative errno on read failure ๐Ÿ’€ the read just didn't read

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Kernel file ./drivers/net/phy/phy-c45.c, plus the whole friend group:

genphy_c45_baset1_able(9), genphy_c45_pma_can_sleep(9), genphy_c45_pma_resume(9), genphy_c45_pma_suspend(9), genphy_c45_pma_baset1_setup_master_slave(9), genphy_c45_pma_setup_forced(9), genphy_c45_an_config_aneg(9), genphy_c45_an_disable_aneg(9), genphy_c45_restart_aneg(9), genphy_c45_check_and_restart_aneg(9), genphy_c45_pma_soft_reset(9), genphy_c45_an_setup_master_slave(9), genphy_c45_read_master_slave(9), genphy_c45_aneg_done(9), genphy_c45_read_link(9), genphy_c45_read_lpa(9), genphy_c45_pma_baset1_read_master_slave(9), genphy_c45_read_pma(9), genphy_c45_read_mdix(9), genphy_c45_write_eee_adv(9), genphy_c45_read_eee_adv(9), genphy_c45_read_eee_lpa(9), genphy_c45_read_eee_cap1(9), genphy_c45_read_eee_cap2(9), genphy_c45_read_eee_abilities(9), genphy_c45_an_config_eee_aneg(9), genphy_c45_pma_baset1_read_abilities(9), genphy_c45_pma_read_ext_abilities(9), genphy_c45_pma_read_abilities(9), genphy_c45_read_status(9), genphy_c45_config_aneg(9), genphy_c45_fast_retrain(9), genphy_c45_plca_get_cfg(9), genphy_c45_plca_set_cfg(9), genphy_c45_plca_get_status(9), genphy_c45_eee_is_active(9), genphy_c45_ethtool_get_eee(9), genphy_c45_ethtool_set_eee(9), oatc14_cable_test_get_result_code(9), genphy_c45_oatc14_cable_test_get_status(9), genphy_c45_oatc14_cable_test_start(9), genphy_c45_oatc14_get_sqi_max(9), genphy_c45_oatc14_get_sqi(9)


okay that's the whole page, go be iconic with your SQI capabilities ๐Ÿงš๐Ÿ’ซ

source lives in ./drivers/net/phy, dated October 2026 โ€” mwah, bye bestie ๐Ÿ’œ๐ŸŽ€
๐Ÿ“ฆ where this page comes from