scsi_mode_select(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

scsi_mode_select β€” issue a mode select. And yes bestie, this is straight from the Kernel API Manual, so we’re officially in kernel API land now ✨.

✨ SYNOPSIS ✨

Okay so here’s the exact signature β€” copy it carefully and do not let autocorrect touch it:

int scsi_mode_select (struct scsi_device *sdev , int pf , int sp ,
       unsigned char *buffer , int len , int timeout , int retries , struct
       scsi_mode_data *data , struct scsi_sense_hdr *sshdr );

πŸŽ€ ARGUMENTS πŸŽ€

  • sdev β€” the SCSI device to be queried. That’s the main character here πŸ’–.
  • pf β€” page format bit: 1 == standard, 0 == vendor specific.
  • sp β€” save page bit: 0 == don't save, 1 == save.
  • buffer β€” request buffer. Important: it may not be smaller than eight bytes, periodt.
  • len β€” length of request buffer.
  • timeout β€” command timeout.
  • retries β€” number of retries before failing.
  • data β€” returns a structure abstracting the mode header data.
  • sshdr β€” place to put sense data (or NULL if no sense to be collected). It must be SCSI_SENSE_BUFFERSIZE big.

🌸 DESCRIPTION 🌸

The return vibe check is the whole description here: returns zero if successful; negative error number or scsi status on error. That’s it, icon β€” no extra lore, no secret side quest 😭.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/scsi/scsi_lib.c β€” that’s the source-file moment. And then the whole squad:


With love and zero panic, your kernel bestie πŸ’– β€” source/version ./drivers/scsi, dated October 2026, and we were just reading scsi_mode_select(9) the whole time 🫢.

πŸ“¦ where this page comes from