hns_mdio_read_c22(9)
π hns_mdio_read_c22(9) π
okay bestie, welcome to the Kernel API Manual β yes that's the manual name, we're literally in it β and today's main character is hns_mdio_read_c22, a function that π«Ά reads a phy register. that's it, that's the vibe. a little one-job icon and honestly? respect.
πΈ NAME πΈ
hns_mdio_read_c22 β access phy register β¨
like, it goes and gets you the goods from a phy register. no cap.
π¦ SYNOPSIS π¦
int hns_mdio_read_c22 (struct mii_bus *bus , int phy_id , int regnum );
the way this signature just sits there being all tidy π three params, returns an int, we love a low-drama prototype.
π ARGUMENTS π
busβ the mdio bus, bestie. it's the bus. that's the whole description and we're honoring it fr fr.phy_idβ the phy id π which phy are we talking to? this one.regnumβ the register num π which register are we reading? this one.
three args, zero mystery, we stan.
π DESCRIPTION π
Return phy register value. that's the entire description and honestly it ate π no notes.
so like, you call it, it gives you back the value sitting in that phy register. the return type is int (see the synopsis, it's right there, i'm not making stuff up). that's the whole story, periodt.
ngl it's giving "tiny function, big responsibility" β you're reaching into hardware registers, so please know whatphy_idandregnumyou actually mean before you go poking π
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/hisilicon/hns_mdio.cβ the actual source, go read it, iykyk π hns_mdio_write_c22(9)β the write-y sibling πhns_mdio_write_c45(9)β clause 45 write, also write-y βοΈhns_mdio_read_c45(9)β clause 45 read, the other read β¨hns_mdio_reset(9)β reset time π₯hns_mdio_probe(9)β probe, the origin story βhns_mdio_remove(9)β remove, the sad goodbye π
and that's the page, bestie! this lil gem lives under the source dir ./drivers/net/ethernet/hisilicon, and it's dated October 2026 in the manual β so when you see that date in the wild, you'll know exactly which icon wrote it ππ¦π
π¦ 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