ata_eh_speed_down_verdict(9)
π ata_eh_speed_down_verdict β okay so this is THE function
Bestie, welcome to the ata_eh_speed_down_verdict page from the Kernel API Manual. Yes, the whole name is a mouthful, no cap. It's a libata kernel function, it lives in the kernel API docs, and it is literally about to tell you how badly your disk is doing and what to do about it. π©Ίβ¨
β¨ SYNOPSIS β¨
unsigned int ata_eh_speed_down_verdict (struct ata_device *dev );
Like, that's the whole vibe. One function, one argument, one unsigned int coming back. Clean. Iconic. π
πΈ ARGUMENTS πΈ
devβ the device of interest π«Ά β the ATA device you're side-eyeing and want the verdict on.
π DESCRIPTION π
Okay so here's the tea. This function examines the error ring of dev and figures out whether:
- NCQ needs to be turned off,
- the transfer speed should be stepped down, or
- falling back to PIO is necessary.
Then it hands you back a verdict. Very main character energy. π
π¦ The error categories (iykyk)
ECAT_ATA_BUSβ ATA_BUS error for any commandECAT_TOUT_HSMβ TIMEOUT for any command, or HSM violation for IO commandsECAT_UNK_DEVβ Unknown DEV error for IO commandsECAT_DUBIOUS_*β identical to the above three, except these occurred while data transfer hasn't been verified π
β The verdicts
NCQ_OFFβ turn off NCQ.SPEED_DOWNβ speed down the transfer speed, but don't fall back to PIO.FALLBACK_TO_PIOβ fall back to PIO.
Heads up bestie: even if multiple verdicts are returned, only one action is taken per error. π« An action triggered by non-DUBIOUS errors clearsering, while one triggered byDUBIOUS_*errors doesn't. Why? To expedite speed down decisions right after the device is initially configured. Slay, efficiency. β‘
π§ The speed down rules (the actual receipts)
The following are speed down rules. #1 and #2 deal with DUBIOUS errors.
- If more than one
DUBIOUS_ATA_BUSorDUBIOUS_TOUT_HSMerrors occurred during last 5 mins,SPEED_DOWNandFALLBACK_TO_PIO. - If more than one
DUBIOUS_TOUT_HSMorDUBIOUS_UNK_DEVerrors occurred during last 5 mins,NCQ_OFF. - If more than 8
ATA_BUS,TOUT_HSMorUNK_DEVerrors occurred during last 5 mins,FALLBACK_TO_PIO - If more than 3
TOUT_HSMorUNK_DEVerrors occurred during last 10 mins,NCQ_OFF. - If more than 3
ATA_BUSorTOUT_HSMerrors, or more than 6UNK_DEVerrors occurred during last 10 mins,SPEED_DOWN.
LOCKING: Inherited from caller. π (not me, not you β whoever called this owns the lock, periodt.)
π₯ RETURN π₯
OR of ATA_EH_SPDN_* flags. That's it, that's the return. Bitwise-OR'd goodness. π
π SEE ALSO π
Kernel file ./drivers/ata/libata-eh.c π β and bestie, here comes the whole friend group:
__ata_ehi_push_desc(9)ata_ehi_push_desc(9)ata_ehi_clear_desc(9)ata_port_desc(9)ata_port_pbar_desc(9)ata_internal_cmd_timeout(9)ata_internal_cmd_timed_out(9)ata_eh_acquire(9)ata_eh_release(9)ata_scsi_error(9)ata_scsi_cmd_error_handler(9)ata_scsi_port_error_handler(9)ata_port_wait_eh(9)ata_eh_set_pending(9)ata_qc_schedule_eh(9)ata_std_sched_eh(9)ata_std_end_eh(9)ata_port_schedule_eh(9)ata_link_abort(9)ata_port_abort(9)__ata_port_freeze(9)ata_port_freeze(9)ata_eh_freeze_port(9)ata_eh_thaw_port(9)ata_eh_qc_complete(9)ata_eh_qc_retry(9)ata_dev_disable(9)ata_eh_detach_dev(9)ata_eh_about_to_do(9)ata_eh_done(9)ata_err_string(9)atapi_eh_tur(9)ata_eh_decide_disposition(9)ata_eh_request_sense(9)atapi_eh_request_sense(9)ata_eh_analyze_serror(9)ata_eh_analyze_tf(9)ata_eh_speed_down(9)ata_eh_worth_retry(9)ata_eh_quiet(9)ata_eh_link_set_lpm(9)ata_eh_link_autopsy(9)ata_eh_autopsy(9)ata_get_cmd_name(9)ata_eh_link_report(9)ata_eh_report(9)ata_eh_set_mode(9)atapi_eh_clear_ua(9)ata_eh_maybe_retry_flush(9)ata_eh_recover(9)ata_eh_finish(9)ata_std_error_handler(9)ata_eh_handle_port_suspend(9)ata_eh_handle_port_resume(9)
π Okay that's the page!! This one's straight out of ./drivers/ata, dated October 2026, and it's giving "kernel API manual, but make it cute." Go forth and check those error rings, bestie. ππ¦β¨
π¦ 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