scsi_add_single_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ scsi_add_single_device(9) ✨

okay so bestie, welcome to the scsi_add_single_device page from the Kernel API Manual πŸ’… no cap, this one's a little cutie β€” it's the function that answers when a user asks the kernel to go find a SCSI device. let's get into it 🫢


🌸 SYNOPSIS 🌸

int scsi_add_single_device (uint host , uint channel , uint id , uint lun );

four uint args, one int coming back at you. slay ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • host β€” a user-supplied decimal integer, periodt.
  • channel β€” a user-supplied decimal integer, fr fr.
  • id β€” a user-supplied decimal integer, no cap.
  • lun β€” a user-supplied decimal integer, iconic.

like yes they're all the same description, that's literally what the page says and we respect it πŸ’€ all four are decimal integers that came from the user.

πŸ’– DESCRIPTION πŸ’–

so the way this gets called is lowkey iconic: the user writes "scsi add-single-device" to /proc/scsi/scsi, and that's what triggers it. iykyk πŸ¦‹

once it's in there, it does a scsi_host_lookup, and then it's giving two possible paths:

  • it calls user_scan if that transport type supports it πŸ”₯
  • or else it falls back to scsi_scan_host_selected ✨

either way, the device gets probed/added. main character energy honestly πŸ‘‘

⭐ NOTE ⭐

heads up bestie β€” this seems to be aimed exclusively at SCSI parallel busses. like, that's the vibe check and it passed 🌈

🌸 SEE ALSO 🌸

go look at the kernel file ./drivers/scsi/scsi_proc.c first, and then the whole friend group:


🫢 and that's the whole page!! this one lives out of ./drivers/scsi, dated October 2026 β€” so when you see that version/date in the footer, that's just the page being its cute self. mwah πŸ’‹ go add some devices bestie βœ¨πŸŽ€

πŸ“¦ where this page comes from