adapt_cap_to_t_adapt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… adapt_cap_to_t_adapt(9) β€” Kernel API Manual, but make it make sense

okay so bestie, welcome to the <pink>adapt_cap_to_t_adapt(9)</pink> page from the Kernel API Manual ✨ this one's a lil function that takes your adapt capability and hands you back a TAdapt value. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

adapt_cap_to_t_adapt β€” literally just calculate TAdapt from adapt capability πŸ’– no cap, that's the entire job description.


🌸 SYNOPSIS 🌸

u64 adapt_cap_to_t_adapt (u32 adapt_cap );

she takes one thing, she gives back a u64. icon behaviour πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • adapt_cap β€” the Adapt capability. that's it, that's the input. she's u32, she's the main character, she goes in and the math happens πŸ¦‹

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's where it gets juicy. the function does a lil branching situation, and it's FOR NRZ specifically (that's the mode we're talking about here, bestie, don't @ me):

IF (ADAPT_range = FINE) β†’ TADAPT = 650 x (ADAPT_length + 1) ELSE (IF ADAPT_range = COARSE) β†’ TADAPT = 650 x 2^ADAPT_length

so like… FINE range? you get the + 1 treatment. COARSE range? nah, you get the whole 2^ADAPT_length exponent glow-up. two different paths, both valid, both slaying in their own way πŸ’…

and then β€” the moment we've all been waiting for β€” she returns the calculated TAdapt value in terms of Unit Intervals (UI) ✨ periodt. that's the unit. UI. write it down πŸ“


πŸ¦‹ SEE ALSO πŸ¦‹

bestie this list is long, but every single one of these is part of the same friend group, so like… iykyk. all of these live in the kernel file ./drivers/ufs/core/ufs-txeq.c πŸ“:

like, go read those too. she's not doing this alone, she's got a whole squad 🌈


and that's the page!! mwah πŸ’œ this one came out of ./drivers/ufs/core and it's dated October 2026 β€” so yeah, mark your calendar bestie, this manual page is from the future and it's still serving ⭐ bye!! 🧚

πŸ“¦ where this page comes from