ntb_db_clear_mask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, meet ntb_db_clear_mask(9) β€” a page straight outta the Kernel API Manual ✨ and the name is literally saying β€œclear bits in the local doorbell mask.” Iconic. πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

int ntb_db_clear_mask (struct ntb_dev *ntb , u64 db_bits );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ntb β€” the NTB device context, aka the device we’re talking about. 🫢
  • db_bits β€” the doorbell bits you wanna clear. πŸ””

🌸 DESCRIPTION 🌸

So this one clears bits in the local doorbell mask register. The whole point? It’s allowing doorbell interrupts from being generated for those doorbell bits. Lowkey the mask is the vibe check for interrupts. πŸ’…

Now the important part, no cap: if a doorbell bit is already set at the time the mask is cleared, and the corresponding mask bit is changed from set to clear, then the ntb driver must ensure that ntb_db_event is called. If the hardware does not generate the interrupt on clearing the mask bit, then the driver must call ntb_db_event anyway. Like, even if hardware is being lazy, the driver still has to make the call. 😭πŸ”₯

⭐ RETURN ⭐

Zero on success, otherwise an error number. Slay when zero, error number when not. πŸ’€

🌈 SEE ALSO 🌈

Also pull up the Kernel file ./include/linux/ntb.h and this whole friend group:


Source/version: ./include/linux Β· date: October 2026 Β· page: ntb_db_clear_mask(9) β€” bye bestie, go clear those mask bits responsibly πŸ’‹βœ¨

πŸ“¦ where this page comes from