ata_scsi_un...ive_capacity(9)
π
ata_scsi_unlock_native_capacity β Kernel API Manual, bestie edition
okay so first of all, the actual page title is ata_scsi_unlock_native_capacity(9) and it lives in the Kernel API Manual β but the header at the top is out here doing the absolute most with truncation and shows it as ata_scsi_un...ive_capacity(9) π like girl, spell it out. anyway. below is the whole thing, no cap, every crumb of it.
β¨ NAME β¨
ata_scsi_unlock_native_capacity β unlock native capacity π
that's it. that's the name. short, sweet, and it does exactly what it says on the tin.
π¦ SYNOPSIS π¦
void ata_scsi_unlock_native_capacity (struct scsi_device *sdev );
it returns void, meaning it gives you nothing back β it's giving mysterious, it's giving "the real gift was the unlocking we did along the way" π
πΈ ARGUMENTS πΈ
sdevβ the SCSI device to adjust device capacity for. this is your little guy. your project. your main character. you're adjusting its capacity bestie π
π₯ DESCRIPTION π₯
okay so here's the vibe check: this function gets called if a partition on sdev extends beyond the end of the device π like the partition is out here claiming real estate that the device literally doesn't have. bold. iconic. delusional.
so what does it do about it? it requests EH to unlock HPA. HPA! yes that HPA. it asks EH to go unlock it. that's the whole job fr fr, and honestly someone had to do it π«Ά
LOCKING: this is defined by the SCSI layer. and here's the part you gotta hold in your heart β it might sleep. π΄ so do NOT call this from somewhere rude where sleeping isn't allowed. that's not me being dramatic, that's just the rules.
π SEE ALSO π
the friend group. the whole crew. everybody in the libata-scsi cinematic universe shows up here π
kernel file:
./drivers/ata/libata-scsi.c
and the extended fam:
ata_scsi_set_passthru_sense_fields(9)ata_std_bios_param(9)ata_get_identity(9)ata_cmd_ioctl(9)ata_task_ioctl(9)ata_scsi_qc_new(9)ata_to_sense_error(9)ata_gen_ata_sense(9)ata_scsi_dma_need_drain(9)ata_scsi_sdev_init(9)ata_scsi_sdev_configure(9)ata_scsi_sdev_destroy(9)ata_scsi_start_stop_xlat(9)ata_scsi_flush_xlat(9)scsi_6_lba_len(9)scsi_10_lba_len(9)scsi_16_lba_len(9)scsi_dld(9)ata_scsi_verify_xlat(9)ata_scsi_rw_xlat(9)ata_scsi_translate(9)ata_scsi_rbuf_fill(9)ata_scsiop_inq_std(9)ata_scsiop_inq_00(9)ata_scsiop_inq_80(9)ata_scsiop_inq_83(9)ata_scsiop_inq_89(9)ata_dsm_trim_pages(9)ata_scsiop_inq_b0(9)ata_scsiop_inq_b1(9)ata_scsiop_inq_b2(9)ata_scsiop_inq_b6(9)ata_scsiop_inq_b9(9)ata_scsiop_inquiry(9)modecpy(9)ata_msense_caching(9)ata_msense_control(9)ata_msense_rw_recovery(9)ata_scsiop_mode_sense(9)ata_scsiop_read_cap(9)ata_scsiop_report_luns(9)atapi_xlat(9)ata_scsi_find_dev(9)ata_scsi_pass_thru(9)ata_format_dsm_trim_descr(9)ata_scsi_write_same_xlat(9)ata_scsiop_maint_in(9)ata_scsi_report_zones_complete(9)ata_mselect_caching(9)ata_mselect_control(9)ata_scsi_mode_select_xlat(9)ata_scsi_var_len_cdb_xlat(9)ata_get_xlat_func(9)ata_scsi_simulate(9)ata_scsi_queuecmd(9)ata_scsi_offline_dev(9)ata_scsi_remove_dev(9)ata_scsi_media_change_notify(9)ata_scsi_hotplug(9)ata_scsi_user_scan(9)ata_scsi_dev_rescan(9)
like I said. the whole crew. iykyk π§
π friendly reminder before you go: sdev matters, the partition-beyond-end-of-device case is literally the whole reason this exists, it requests EH to unlock HPA, and the locking is defined by the SCSI layer and might sleep. that's the tea. don't forget it.
okay that's the page!! and for the cute sign-off you asked for: this lil number comes from the source dir ./drivers/ata, dated October 2026, and yes the footer still insists on calling it ata_scsi_un...ive_capacity(9) β we love a consistent aesthetic πβ¨π
π¦ 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