ata_scsiop_mode_sense(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ata_scsiop_mode_sense(9) πŸ’–

okay bestie, so this one lives in the Kernel API Manual and it's literally the fake-out queen of the SCSI world πŸ‘‘ β€” it's about pretending. Let's get into it ✨


🌸 NAME 🌸

ata_scsiop_mode_sense β€” Simulate MODE SENSE 6, 10 commands πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int ata_scsiop_mode_sense (struct ata_device *dev , struct
       scsi_cmnd *cmd , u8 *rbuf );

πŸ’œ ARGUMENTS πŸ’œ

  • dev β€” the target device, the main character of this whole situation 🫢
  • cmd β€” the SCSI command we're interested in, iykyk πŸ‘€
  • rbuf β€” the response buffer, aka where the simulated SCSI cmd output gets sent πŸ“¬

🌈 DESCRIPTION 🌈

So it simulates MODE SENSE commands. That's the whole vibe. πŸ’…

Lowkey important assumption bestie: assume this is invoked for direct access devices only β€” like disks, fr fr. For any other device type there should be no block descriptor. Not a single one. Not even a little one. 🚫

LOCKING: spin_lock_irqsave(host lock) β€” no cap, that's the lock, respect it 😭✨


⭐ SEE ALSO ⭐

Kernel file ./drivers/ata/libata-scsi.c β€” go read it, it's giving essential lore 🧚


k that's the whole page bestie, you ate that πŸ’…βœ¨

shoutout to ./drivers/ata for being the source, and to October 2026 for the date β€” iconic era, we were all there πŸŽ€πŸ¦‹ go forth and simulate, mwah πŸ’–

πŸ“¦ where this page comes from