Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: documentation: scsi_eh: updates for EH changes

SCSI_SOFTIRQ and scsi_softirq() are no longer used. Change to block layer
equivalents.

scsi_setup_cmd_retry() has been deleted. Remove references to it.

SCSI_EH_CANCEL_CMD has been deleted. Remove references to it.

scsi_eh_abort_cmds() has been deleted. Remove references to it.

[mkp: fixed START STOP UNIT]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20241219214928.1170302-1-rdunlap@infradead.org
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Randy Dunlap and committed by
Martin K. Petersen
a9dcee18 faaf18d3

+9 -37
+9 -37
Documentation/scsi/scsi_eh.rst
··· 54 54 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 55 55 56 56 For all non-EH commands, scsi_done() is the completion callback. It 57 - just calls blk_complete_request() to delete the block layer timer and 58 - raise SCSI_SOFTIRQ 57 + just calls blk_mq_complete_request() to delete the block layer timer and 58 + raise BLOCK_SOFTIRQ. 59 59 60 - SCSI_SOFTIRQ handler scsi_softirq calls scsi_decide_disposition() to 61 - determine what to do with the command. scsi_decide_disposition() 62 - looks at the scmd->result value and sense data to determine what to do 63 - with the command. 60 + The BLOCK_SOFTIRQ indirectly calls scsi_complete(), which calls 61 + scsi_decide_disposition() to determine what to do with the command. 62 + scsi_decide_disposition() looks at the scmd->result value and sense 63 + data to determine what to do with the command. 64 64 65 65 - SUCCESS 66 66 ··· 110 110 retry which failed), when retries are exceeded, or when the EH deadline is 111 111 expired. In these cases Step #3 is taken. 112 112 113 - 3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the 113 + 3. scsi_eh_scmd_add(scmd) is invoked for the 114 114 command. See [1-4] for more information. 115 115 116 116 1.3 Asynchronous command aborts ··· 277 277 278 278 :ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd 279 279 280 - - scsi_setup_cmd_retry() 281 280 - move from local eh_work_q to local eh_done_q 282 281 283 282 :LOCKING: none ··· 316 317 ``scsi_eh_get_sense`` 317 318 318 319 This action is taken for each error-completed 319 - (!SCSI_EH_CANCEL_CMD) commands without valid sense data. Most 320 + command without valid sense data. Most 320 321 SCSI transports/LLDDs automatically acquire sense data on 321 322 command failures (autosense). Autosense is recommended for 322 323 performance reasons and as sense information could get out of ··· 346 347 - otherwise 347 348 No action. 348 349 349 - 3. If !list_empty(&eh_work_q), invoke scsi_eh_abort_cmds(). 350 - 351 - ``scsi_eh_abort_cmds`` 352 - 353 - This action is taken for each timed out command when 354 - no_async_abort is enabled in the host template. 355 - hostt->eh_abort_handler() is invoked for each scmd. The 356 - handler returns SUCCESS if it has succeeded to make LLDD and 357 - all related hardware forget about the scmd. 358 - 359 - If a timedout scmd is successfully aborted and the sdev is 360 - either offline or ready, scsi_eh_finish_cmd() is invoked for 361 - the scmd. Otherwise, the scmd is left in eh_work_q for 362 - higher-severity actions. 363 - 364 - Note that both offline and ready status mean that the sdev is 365 - ready to process new scmds, where processing also implies 366 - immediate failing; thus, if a sdev is in one of the two 367 - states, no further recovery action is needed. 368 - 369 - Device readiness is tested using scsi_eh_tur() which issues 370 - TEST_UNIT_READY command. Note that the scmd must have been 371 - aborted successfully before reusing it for TEST_UNIT_READY. 372 - 373 350 4. If !list_empty(&eh_work_q), invoke scsi_eh_ready_devs() 374 351 375 352 ``scsi_eh_ready_devs`` ··· 359 384 360 385 For each sdev which has failed scmds with valid sense data 361 386 of which scsi_check_sense()'s verdict is FAILED, 362 - START_STOP_UNIT command is issued w/ start=1. Note that 387 + START STOP UNIT command is issued w/ start=1. Note that 363 388 as we explicitly choose error-completed scmds, it is known 364 389 that lower layers have forgotten about the scmd and we can 365 390 reuse it for STU. ··· 452 477 The following conditions must be true on exit from the handler. 453 478 454 479 - shost->host_failed is zero. 455 - 456 - - Each scmd is in such a state that scsi_setup_cmd_retry() on the 457 - scmd doesn't make any difference. 458 480 459 481 - shost->eh_cmd_q is cleared. 460 482