nx842_OF_upd_maxsglen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nx842_OF_upd_maxsglen β€” like, the kernel API manual page, bestie

okay so this is nx842_OF_upd_maxsglen(9) from the Kernel API Manual and honestly? it's giving "tiny function, big responsibility." it reads the ibm,max-sg-len property out of the device tree and updates your device info with it. slay. let's get into it πŸ’–


✨ NAME ✨

nx842_OF_upd_maxsglen β€” no cap, this is the one that updates the device info from the OF maxsglen prop πŸŽ€


🌸 SYNOPSIS 🌸

int nx842_OF_upd_maxsglen (struct nx842_devdata *devdata , struct property *prop );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • devdata β€” the struct nx842_devdata you're updating, bestie. that's the one getting the glow-up ✨
  • prop β€” a struct property point (pt β€” it's a pointer, i'm keeping the typo energy, that's literally what the page says πŸ’€) containing the maxsyncop for the update

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the definition of the 'ibm,max-sg-len' OF property, and it's actually important so listen up 🫢:

this field indicates the maximum byte length of a scatter list for the platform facility. it's a single cell encoded as with encode-int.

that's it. that's the whole vibe. one cell, one number, maximum byte length of a scatter list, encoded as with encode-int. iconic 🌈


πŸ“ EXAMPLE πŸ“

# od -x ibm,max-sg-len 0000000 0000 0ff0

in this example, the maximum byte length of a scatter list is 0x0ff0 (4,080). yes, four thousand and eighty. the math is mathing ✨πŸ”₯


πŸ’œ RETURN πŸ’œ

  • 0 β€” on success, we love to see it πŸŽ‰
  • -EINVAL β€” on failure, it's giving error, it's giving invalid argument 😭

🧚 SEE ALSO 🧚

kernel file ./drivers/crypto/nx/nx-common-pseries.c β€” go read it, iykwim πŸ‘€

then the whole friend group:

all of them. no skips. the whole squad πŸ«ΆπŸ’…


and that's the page, bestie πŸŽ€ this little baddie lives in ./drivers/crypto/nx and the manual's dated October 2026 β€” periodt, go forth and scatter-list responsibly πŸŒΈπŸ’–πŸ¦‹

πŸ“¦ where this page comes from