ata_to_sense_error(9)
πΈ NAME πΈ
ata_to_sense_error β convert ATA error to SCSI error
Okay bestie, this is the ata_to_sense_error(9) page from the Kernel API Manual, and it's literally about turning an ATA error into a SCSI error. Iconic little translator behavior, no cap.
β¨ SYNOPSIS β¨
The whole call looks exactly like this:
void ata_to_sense_error (u8 drv_stat , u8 drv_err , u8 *sk , u8 *asc ,
u8 *ascq );
π ARGUMENTS π
drv_statβ the value contained in the ATA status register. That's the status byte we're working with, bestie.drv_errβ the value contained in the ATA error register. That's the error byte.skβ the sense key we'll fill out. Yes, we're writing into this pointer.ascβ the additional sense code we'll fill out. Another pointer getting filled.ascqβ the additional sense code qualifier we'll fill out. The third pointer in the little fill-out squad.
π DESCRIPTION π
So here's the vibe: this function converts an ATA error into a SCSI error. It fills out pointers to the SK, ASC, and ASCQ bytes for later use in fixed or descriptor format sense blocks. That's the whole plot, and it ate.
LOCKING: the locking note is literally spin_lock_irqsave(host lock). That's the caveat, so keep it in mind, okay? π«Ά
π₯ SEE ALSO π₯
The whole kernel friend group is here, bestie. Every single one:
- Kernel file
./drivers/ata/libata-scsi.c ata_scsi_set_passthru_sense_fields(9)ata_std_bios_param(9)ata_scsi_unlock_native_capacity(9)ata_get_identity(9)ata_cmd_ioctl(9)ata_task_ioctl(9)ata_scsi_qc_new(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)
Source/version cutie: ./drivers/ata Β· date: October 2026. Bye bestie, go convert those errors and slay π
β¨π
π¦ 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