scsi_mode_select(9)
π 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 (orNULLif no sense to be collected). It must beSCSI_SENSE_BUFFERSIZEbig.
πΈ 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:
__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_get_internal_cmd(9)scsi_put_internal_cmd(9)scsi_device_from_queue(9)scsi_block_requests(9)scsi_unblock_requests(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)
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
- 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