scsi_get_internal_cmd(9)
π
scsi_get_internal_cmd (9) β Kernel API Manual β¨
Okay so bestie, welcome to the manual page for scsi_get_internal_cmd β it's a kernel API thing, and honestly? It's giving "small function, big responsibility." Let's get into it π«Ά
πΈ NAME πΈ
scsi_get_internal_cmd β Allocate an internal SCSI command. That's it, that's the vibe β¨
π SYNOPSIS π
struct scsi_cmnd * scsi_get_internal_cmd (struct scsi_device *sdev ,
enum dma_data_direction data_direction , blk_mq_req_flags_t flags );
Literally the whole signature, character for character, no cap π
π¦ ARGUMENTS π¦
sdevβ the SCSI device you're grabbing the command from. Like, which device, bestie? This one.data_directionβ the data direction for the command you just allocated. Gotta know which way the bytes are flowing πflagsβ your request allocation flags, for exampleBLK_MQ_REQ_RESERVEDorBLK_MQ_REQ_NOWAIT. Pick your little permission slips wisely π
π DESCRIPTION π
So what does it do? It allocates a SCSI command for internal LLDD use. That's the whole thing β a fresh struct scsi_cmnd * handed to you for LLDD-internal business. Short description, iconic behavior. Periodt β¨
π§ SEE ALSO π§
Every single sibling, no gatekeeping π Starting with the kernel file itself: ./drivers/scsi/scsi_lib.c, and then the whole friend group:
__scsi_queue_insert(9)scsi_queue_insert(9)scsi_failures_reset_retries(9)scsi_check_passthrough(9)scsi_execute_cmd(9)scsi_run_queue(9)scsi_result_to_blk_status(9)scsi_rq_err_bytes(9)scsi_io_completion(9)scsi_alloc_sgtables(9)scsi_initialize_rq(9)scsi_alloc_request(9)scsi_dispatch_cmd(9)scsi_put_internal_cmd(9)β the one that gives it back, lowkey the main character of cleanup π§Ήscsi_device_from_queue(9)scsi_block_requests(9)scsi_unblock_requests(9)scsi_mode_select(9)scsi_mode_sense(9)scsi_test_unit_ready(9)scsi_device_set_state(9)scsi_evt_emit(9)scsi_evt_thread(9)sdev_evt_send(9)sdev_evt_alloc(9)sdev_evt_send_simple(9)scsi_device_quiesce(9)scsi_device_resume(9)scsi_internal_device_block_nowait(9)scsi_device_block(9)scsi_internal_device_unblock_nowait(9)scsi_internal_device_unblock(9)scsi_block_targets(9)scsi_host_block(9)scsi_kmap_atomic_sg(9)scsi_kunmap_atomic_sg(9)scsi_vpd_lun_id(9)scsi_vpd_lun_serial(9)scsi_vpd_tpg_id(9)scsi_build_sense(9)
π Friendly reminder: this page is short but the command it hands you is a whole responsibility. Allocate responsibly, bestie.
And that's the page!! Sign-off time π this lil gem lives in ./drivers/scsi, dated October 2026, and it's filed under scsi_get_internal_cmd(9). Slay, go forth, allocate internal commands ππ₯
π¦ 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