ntbm_msi_re...threaded_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

Okay bestie, welcome to the Kernel API Manual page for ntbm_msi_request_threaded_irq β€” the page header abbreviates it as ntbm_msi_re...threaded_irq(9), because apparently even manpages gotta keep it short and mysterious. ✨ This function is here to allocate an MSI interrupt. No cap. πŸ’…

✨ SYNOPSIS ✨

int ntbm_msi_request_threaded_irq (struct ntb_dev *ntb , irq_handler_t
handler , irq_handler_t thread_fn , const char *name , void *dev_id ,
struct ntb_msi_desc *msi_desc );

πŸŽ€ ARGUMENTS πŸŽ€

  • ntb β€” the NTB device context. It's the device situation you're working with, bestie.
  • handler β€” function to be called when the IRQ occurs. This is the main-character callback. πŸ‘‘
  • thread_fn β€” function to be called in a threaded interrupt context. It's NULL for clients which handle everything in handler. So if handler is doing the whole thing, this cutie stays NULL. 🫢
  • name β€” an ascii name for the claiming device, dev_name(dev) if NULL. Name drop it, or let dev_name(dev) handle it.
  • dev_id β€” a cookie passed back to the handler function. πŸͺ Not the snack kind, but it is being passed back, so.
  • msi_desc β€” MSI descriptor data which triggers the interrupt. This is the descriptor that makes the interrupt happen.

πŸ’– DESCRIPTION πŸ’–

Here's the vibe: this function assigns an interrupt handler to an unused MSI interrupt and returns the descriptor used to trigger it. Then that descriptor can be sent to a peer to trigger the interrupt. Iconic behavior, honestly. πŸ”₯

The interrupt resource is managed with devres, so it will be automatically freed when the NTB device is torn down. Lowkey one less cleanup thing for you. ✨

If an IRQ allocated with this function needs to be freed separately, ntbm_free_irq must be used. Like, for real β€” that's the required call for freeing it separately. Don't skip it. πŸ’€

πŸ”₯ RETURN πŸ”₯

IRQ number assigned on success, otherwise a negative error number. So: success gives you the IRQ number, and anything else is a negative error number. Read the return value, bestie. 😌

🌈 SEE ALSO 🌈


Mwah πŸ’‹ this page comes from ./drivers/ntb and is dated October 2026 β€” that's the source/version and date footer, folded in with love. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from