cqhci_crypto_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cqhci_crypto_init(9) β€” from the Kernel API Manual bestie, no cap

Okay so this is a page from the Kernel API Manual, and honestly? It's a little one but it does things, so let's get into it πŸŽ€


✨ NAME ✨

cqhci_crypto_init β€” the function that gets CQHCI crypto support up and running, periodt πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int cqhci_crypto_init (struct cqhci_host *cq_host );

🌸 ARGUMENTS 🌸

  • cq_host β€” a cqhci host 🫢 that's the one and only thing you hand it

πŸ’– DESCRIPTION πŸ’–

So here's the vibe check πŸ’…: if the driver already set MMC_CAP2_CRYPTO, and the CQE declares CQHCI_CAP_CS, then this thing goes ahead and initializes the crypto support ✨

And what does "initializing the crypto support" actually involve? Bestie, I'm so glad you asked:

  • reading the crypto capability registers πŸ“–
  • initializing the blk_crypto_profile
  • clearing all the keyslots 🧹 (yes, all of them, every single one)
  • enabling 128-bit task descriptors πŸ‘‘

It's giving "setup montage"... iconic honestly 🌈


πŸ”₯ RETURN πŸ”₯

  • 0 😌 β€” crypto was initialized or it just isn't supported. Wondering which one it is? Check whether MMC_CAP2_CRYPTO is still set β€” that flag is literally the answer key πŸ”‘
  • a negative errno value πŸ’€ β€” on an unexpected error, because sometimes things just don't slay
Lowkey important: 0 doesn't mean "yes crypto happened" β€” it means "either it happened or it couldn't, and the flag tells you which." Don't get it twisted πŸ™ˆ

⭐ SEE ALSO ⭐

  • kernel file ./drivers/mmc/host/cqhci-crypto.c β€” go read it, iykyk πŸ“š

And that's the whole page, bestie 🧚 Signing off from ./drivers/mmc/host, dated October 2026, straight out of the Kernel API Manual πŸ’œ Slay responsibly πŸŽ€

πŸ“¦ where this page comes from