ata_eh_recover(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_eh_recover(9) β€” okay so this is the kernel API manual page, bestie

No like literally, ata_eh_recover is a kernel API function and this is its page, and we're gonna get through it together 🫢


✨ NAME ✨

ata_eh_recover β€” recover host port after error πŸ”₯


🌸 SYNOPSIS 🌸

int ata_eh_recover (struct ata_port *ap , struct ata_reset_operations
       *reset_ops , struct ata_link **r_failed_link );

Yes it's one long line and yes it's fine, breathe πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • ap β€” the host port we're gonna recover, that's the main character of this whole thing
  • reset_ops β€” the set of reset operations to use, like, the toolkit for this recovery era
  • r_failed_link β€” an out parameter 😌 for the failed link. it gets filled in for you, queen

πŸ’œ DESCRIPTION πŸ’œ

Okay so this function? This is the alpha and omega, the yin and yang, the heart and soul of libata exception handling. Periodt. πŸ‘‘

On entry, the actions required to recover each link and the hotplug requests are recorded in the link's eh_context. Then this function executes all the operations β€” with appropriate retrials and fallbacks β€” to resurrect failed devices, detach goners, and greet newcomers. It's giving life cycle event of the century honestly 🌈

LOCKING: Kernel thread context (may sleep). So like, it's allowed to nap, no cap πŸ˜΄πŸ’€

⭐ RETURN ⭐

  • 0 on success πŸ’–
  • -errno on failure πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/ata/libata-eh.c β€” go read it, iykyk πŸ“–βœ¨

Then the whole squad, in order, don't skip anybody:

__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_verdict(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_finish(9), ata_std_error_handler(9), ata_eh_handle_port_suspend(9), ata_eh_handle_port_resume(9)

Like, that's the whole group chat and they ALL ate πŸ’…πŸ”₯


kisses bestie, this page lives in the kernel source tree at ./drivers/ata, it's the October 2026 edition, and it's part of the Kernel API Manual β€” mwah πŸŽ€πŸ«ΆπŸ’–

πŸ“¦ where this page comes from