__scsi_device_lookup(9)
π __scsi_device_lookup(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for __scsi_device_lookup(9), and the whole vibe is βfind a device given the host, but make it UNLOCKED.β The (UNLOCKED) is literally right there in the name, so bestie please keep that in mind π«Ά
π NAME π
__scsi_device_lookup β find a device given the host (UNLOCKED).
β¨ SYNOPSIS β¨
struct scsi_device * __scsi_device_lookup (struct Scsi_Host *shost , uint channel , uint id , u64 lun );
πΈ ARGUMENTS πΈ
shostβ SCSI host pointerchannelβ SCSI channel (zero if only one channel)idβ SCSI target number (physical unit number)lunβ SCSI Logical Unit Number
π¦ DESCRIPTION π¦
Looks up the scsi_device with the specified channel, id, lun for a given host. The returned scsi_device does not have an additional reference.
π¨ lock warning, bestie: you must hold the host'shost_lockover this call and any access to the returnedscsi_device. No cap, that part is not optional π
π NOTE π
The only reason why drivers would want to use this is because they need to access the device list in irq context. Otherwise you really want to use scsi_device_lookup instead. It's giving βspecial-case energy,β iykyk π
π₯ SEE ALSO π₯
Kernel file ./drivers/scsi/scsi.c β plus the whole friend group:
scsi_finish_command(9)scsi_change_queue_depth(9)scsi_track_queue_full(9)scsi_vpd_inquiry(9)scsi_get_vpd_page(9)scsi_get_vpd_buf(9)scsi_attach_vpd(9)scsi_report_opcode(9)scsi_cdl_check(9)scsi_cdl_enable(9)scsi_device_get(9)scsi_device_put(9)starget_for_each_device(9)__starget_for_each_device(9)__scsi_device_lookup_by_target(9)scsi_device_lookup_by_target(9)scsi_device_lookup(9)
that's the whole page, bestie π
β source/version is ./drivers/scsi, date is October 2026, and the star of the show is __scsi_device_lookup(9). slay and bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms