Skip to content

Commit 546527b

Browse files
damien-lemoalfloatious
authored andcommitted
Documentation: driver-api: Update libata error handler information
Update ``->error_handler()`` section of the libata documentation file Documentation/driver-api/libata.rst to remove the reference to the function ata_do_eh() as that function was removed. The reference to the function ata_bmdma_drive_eh() is also removed as that function does not exist at all. And while at it, cleanup the description of the various reset operations using a bullet list. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20250716020315.235457-4-dlemoal@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent a4daf08 commit 546527b

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

Documentation/driver-api/libata.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,18 +283,25 @@ interrupts, start DMA engine, etc.
283283

284284
``->error_handler()`` is a driver's hook into probe, hotplug, and recovery
285285
and other exceptional conditions. The primary responsibility of an
286-
implementation is to call :c:func:`ata_do_eh` or :c:func:`ata_bmdma_drive_eh`
287-
with a set of EH hooks as arguments:
286+
implementation is to call :c:func:`ata_std_error_handler`.
288287

289-
'prereset' hook (may be NULL) is called during an EH reset, before any
290-
other actions are taken.
288+
:c:func:`ata_std_error_handler` will perform a standard error handling sequence
289+
to resurect failed devices, detach lost devices and add new devices (if any).
290+
This function will call the various reset operations for a port, as needed.
291+
These operations are as follows.
291292

292-
'postreset' hook (may be NULL) is called after the EH reset is
293-
performed. Based on existing conditions, severity of the problem, and
294-
hardware capabilities,
293+
* The 'prereset' operation (which may be NULL) is called during an EH reset,
294+
before any other action is taken.
295295

296-
Either 'softreset' (may be NULL) or 'hardreset' (may be NULL) will be
297-
called to perform the low-level EH reset.
296+
* The 'postreset' hook (which may be NULL) is called after the EH reset is
297+
performed. Based on existing conditions, severity of the problem, and hardware
298+
capabilities,
299+
300+
* Either the 'softreset' operation or the 'hardreset' operation will be called
301+
to perform the low-level EH reset. If both operations are defined,
302+
'hardreset' is preferred and used. If both are not defined, no low-level reset
303+
is performed and EH assumes that an ATA class device is connected through the
304+
link.
298305

299306
::
300307

0 commit comments

Comments
 (0)