scsi_send_eh_cmnd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scsi_send_eh_cmnd(9) β€” Kernel API Manual πŸŽ€

okay bestie, welcome to the kernel API manual, and honestly? this one is kinda niche but lowkey iconic: scsi_send_eh_cmnd. it’s giving β€œwe’re in error recovery and we still have to send a command,” and yes, it slays in its own chaotic way. ✨


🌸 SYNOPSIS 🌸

enum scsi_disposition scsi_send_eh_cmnd (struct scsi_cmnd *scmd ,
unsigned char *cmnd , int cmnd_size , int timeout , unsigned sense_bytes
);

πŸŽ€ ARGUMENTS πŸŽ€

  • scmd β€” the SCSI command structure we’re gonna hijack. yes, hijack. dramatic, but accurate. πŸ’…
  • cmnd β€” the CDB to send. this is the actual command payload, no cap.
  • cmnd_size β€” size in bytes of cmnd. gotta know how big the CDB is, obviously.
  • timeout β€” timeout for this request. give it a time limit or it will absolutely overstay its welcome.
  • sense_bytes β€” size of sense data to copy, or 0. zero means we’re not copying sense data, simple as that. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function is used to send a SCSI command down to a target device as part of the error recovery process. like, things already went sideways, and now we’re doing recovery-core. it’s not the main character of normal I/O, it’s the main character of β€œokay bestie, let’s try to fix this.” 😭

see also scsi_eh_prep_cmnd above. that one’s the setup bestie; this one’s the send-it-for-real bestie.

Return value: SUCCESS or FAILED or NEEDS_RETRY β€” that’s it, those are the three vibes. success, failure, or β€œrun it back.” πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/scsi/scsi_error.c


and that’s the whole page, bestie. this lil kernel API manual moment is brought to you by ./drivers/scsi, dated October 2026, and yes, scsi_send_eh_cmnd(9) ate. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from