ENUM PHY_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is enum phy_state(9) from the Kernel API Manual, and it is literally the PHY state machine states: πŸ’…βœ¨

✨ SYNOPSIS ✨

Here’s the exact shape, no cap:

enum phy_state {
    PHY_DOWN ,
    PHY_READY ,
    PHY_HALTED ,
    PHY_ERROR ,
    PHY_UP ,
    PHY_RUNNING ,
    PHY_NOLINK ,
    PHY_CABLETEST

};

πŸŽ€ Constants πŸŽ€

okay so these are the states, and the little transition bullets matter, fr fr:

  • PHY_DOWN β€” PHY device and driver are not ready for anything. probe should be called if and only if the PHY is in this state, given that the PHY device exists.
    • PHY driver probe function will set the state to PHY_READY.
  • PHY_READY β€” PHY is ready to send and receive packets, but the controller is not. By default, PHYs which do not implement probe will be set to this state by phy_probe.
    • start will set the state to UP.
  • PHY_HALTED β€” PHY is up, but no polling or interrupts are done.
    • phy_start moves to PHY_UP.
  • PHY_ERROR β€” PHY is up, but is in an error state.
    • phy_stop moves to PHY_HALTED.
  • PHY_UP β€” The PHY and attached device are ready to do work. Interrupts should be started here.
    • timer moves to PHY_NOLINK or PHY_RUNNING.
  • PHY_RUNNING β€” PHY is currently up, running, and possibly sending and/or receiving packets.
    • irq or timer will set PHY_NOLINK if link goes down.
    • phy_stop moves to PHY_HALTED.
  • PHY_NOLINK β€” PHY is up, but not currently plugged in.
    • irq or timer will set PHY_RUNNING if link comes back.
    • phy_stop moves to PHY_HALTED.
  • PHY_CABLETEST β€” PHY is performing a cable test. Packet reception/sending is not expected to work, carrier will be indicated as down. PHY will be polled once per second, or on interrupt for its current state. Once complete, move to UP to restart the PHY.
    • phy_stop aborts the running test and moves to PHY_HALTED.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/phy.h, enum phy_interface_t(9), phy_modes(9), rgmii_clock(9), struct mdio_bus_stats(9), struct mii_bus(9), mdiobus_alloc(9), struct phy_c45_device_ids(9), struct phy_oatc14_sqi_capability(9), struct phy_device(9), struct phy_tdr_config(9), enum link_inband_signalling(9), struct phy_plca_cfg(9), struct phy_plca_status(9), struct phy_led(9), struct phy_mse_capability(9), struct phy_mse_snapshot(9), struct phy_driver(9), phy_id_compare(9), phy_id_compare_vendor(9), phy_id_compare_model(9), phydev_id_compare(9), phy_is_started(9), phy_driver_is_genphy(9), phy_disable_eee_mode(9), phy_can_wakeup(9), phy_may_wakeup(9), phy_read(9), __phy_read(9), phy_write(9), __phy_write(9), __phy_modify_changed(9), phy_read_mmd_poll_timeout(9), __phy_set_bits(9), __phy_clear_bits(9), phy_set_bits(9), phy_clear_bits(9), __phy_set_bits_mmd(9), __phy_clear_bits_mmd(9), phy_set_bits_mmd(9), phy_clear_bits_mmd(9), phy_interrupt_is_valid(9), phy_polling_mode(9), phy_has_hwtstamp(9), phy_has_rxtstamp(9), phy_has_tsinfo(9), phy_has_txtstamp(9), phy_is_default_hwtstamp(9), phy_on_sfp(9), phy_interface_mode_is_rgmii(9), phy_interface_mode_is_8023z(9), phy_interface_is_rgmii(9), phy_is_pseudo_fixed_link(9), phy_module_driver(9).


before u go, bestie: this page’s source/version is ./include/linux, and the date is October 2026 β€” mwah πŸ’‹βœ¨πŸ«Ά

πŸ“¦ where this page comes from