memstick_next_req(9)
π memstick_next_req(9) β the kernel API manual, but make it make sense
okay so bestie, we're in the <pink>Kernel API Manual</pink> today and the star of the show is literally memstick_next_req β like, the whole page is named after it. it's a function the host driver calls to grab the next request it should be working on. no notes, it's iconic π
β¨ SYNOPSIS β¨
int memstick_next_req (struct memstick_host *host , struct
memstick_request **mrq );
that's the whole signature, copy it exactly, don't get cute with it π«Ά
πΈ ARGUMENTS πΈ
hostβ the host you're working with. the one and only. your main character host πmrqβ a pointer where the request gets stuck in. yes literally, that's the deal β you hand it a pointer-to-pointer and it points it at the request π
π DESCRIPTION π
so here's the vibe: the host calls this function while it's in the idle state β and that means *mrq == NULL β or it calls it after it's finished the previous request, in which case *mrq should be pointing at that previous request β¨
and ngl, here's the important bit: if that previous request was unsuccessful, it gets retried for a predetermined number of times. like, the function is not just gonna let it slide, it's giving second chances (a set amount of them, no infinite loop energy here) π₯
β RETURN β
a value of 0 means a new request was assigned to the host β we love a success story, slay π
otherwise you get a negative error code. so like, not zero = something went sideways, handle it bestie π
π¦ SEE ALSO π¦
- Kernel file
./drivers/memstick/core/memstick.c memstick_detect_change(9)memstick_new_req(9)memstick_init_req_sg(9)memstick_init_req(9)memstick_set_rw_addr(9)memstick_alloc_host(9)memstick_add_host(9)memstick_remove_host(9)memstick_free_host(9)memstick_suspend_host(9)memstick_resume_host(9)
like the whole memstick friend group, fr fr β go read them all, iykyk π
heads up bestie: the retry thing only kicks in when the previous request actually failed. don't go assuming retries happen out of nowhere β read the description again if you gotta π
and that's the page! source lives in ./drivers/memstick/core, dated October 2026, and the whole thing is filed under memstick_next_req(9) β periodt, go forth and process those requests ππ§
π¦ 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