NCR5380_abort(9)
NCR5380_abort(9)
okay so bestie, welcome to the Kernel API Manual π this page is all about NCR5380_abort(9), and it's giving βSCSI host abort-handlerβ main character energy. Let's get into it, fr fr.
π NAME π
NCR5380_abort β scsi host eh_abort_handler() method
β¨ SYNOPSIS β¨
int NCR5380_abort (struct scsi_cmnd *cmd );
π ARGUMENTS π
cmdβ the command to be aborted
π¦ DESCRIPTION π¦
The mission, bestie: try to abort the command cmd by removing it from queues and/or sending the target an abort message. This may not succeed in causing a target to abort the command β no cap, it might just not land. Nonetheless, the low-level driver must forget about the command, because the mid-layer reclaims it and it may be re-issued. Periodt.
The normal path taken by a command is as follows. For EH we trace this same path to locate and abort the command. Iconic little route, honestly:
unissued -> selecting -> [unissued -> selecting ->]... connected ->
[disconnected -> connected ->]... [autosense -> connected ->] done
If cmd was not found at all then presumably it has already been completed, in which case return SUCCESS to try to avoid further EH measures. Slay, goodbye, no extra drama.
If the command has not completed yet, we must not fail to find it. We have no option but to forget the aborted command (even if it still lacks sense data). The mid-layer may re-issue a command that is in error recovery (see scsi_send_eh_cmnd), but the logic and data structures in this driver are such that a command can appear on one queue only. That's the rule, iykyk.
The lock protects driver data structures, but EH handlers also use it to serialize their own execution and prevent their own re-entry. Lock lore π .
πΈ SEE ALSO πΈ
Kernel file ./drivers/scsi/NCR5380.c β and the whole SEE ALSO squad, no cap:
initialize_SCp(9)NCR5380_poll_politely2(9)NCR5380_print(9)NCR5380_print_phase(9)NCR5380_info(9)NCR5380_init(9)NCR5380_maybe_reset_bus(9)NCR5380_exit(9)complete_cmd(9)NCR5380_queue_command(9)dequeue_next_cmd(9)NCR5380_main(9)NCR5380_intr(9)NCR5380_select(9)NCR5380_transfer_pio(9)do_reset(9)do_abort(9)list_find_cmd(9)NCR5380_host_reset(9)
kisses from ./drivers/scsi, October 2026 β NCR5380_abort(9) out πβ¨
π¦ 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