ice_cpi_read_phy(9)
π ice_cpi_read_phy β read a CPI port register (kernel API manual, bestie edition) π
okay so picture this: you're deep in the kernel, you're chillin' in the ice driver, and you just gotta read a register off a CPI port. that's literally what ice_cpi_read_phy is for. it's giving "small function, big responsibility." iconic behavior, no cap. β¨
πΈ SYNOPSIS πΈ
int ice_cpi_read_phy (struct ice_hw *hw , u8 phy , u32 addr , u32 *val );
like, that's the whole vibe. four args, one int coming back atcha. π«Ά
π ARGUMENTS π
hwβ pointer to the HW struct. your hardware bestie, the one holding all the state. don't lose her πphyβ the phy index of the port the CPI action is taken on. which port are we doing the thing on? this one, bestie.addrβ the PHY register address. the exact spot you're peeking at πvalβ storage for the register value. you hand over a pointer and the value gets dropped in there. it's a whole "you give me a place, I give you the tea" situation β
β RETURN β
0on success β slay, it worked π- other error codes when it failed to read from PHY β yeah that happens sometimes, it's not giving what it's supposed to give π
π¦ SEE ALSO π¦
the kernel file that has all the lore:
./drivers/net/ethernet/intel/ice/ice_cpi.c
and the whole friend group, fr fr:
ice_cpi_get_dest_dev(9), ice_cpi_write_phy(9), ice_cpi_wait_req0_ack0(9), ice_cpi_wait_ack(9), ice_cpi_req0(9), ice_cpi_exec_cmd(9), ice_cpi_phy_lock(9), ice_cpi_exec(9), ice_cpi_set_cmd(9), ice_cpi_ena_dis_clk_ref(9)
ngl, go read ice_cpi_write_phy(9) next if you're feeling spicy β that's the read function's partner in crime π₯
okay that's the page!! this lil gem lives down in ./drivers/net/ethernet/intel/ice, version/date situation is October 2026, and it's filed under ice_cpi_read_phy(9) in the kernel API manual. mwah, mwah, go read a register responsibly ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms