Skip to content

Commit 6b4f165

Browse files
Niklas Casseldamien-lemoal
authored andcommitted
ata: libata: remove deprecated EH callbacks
Now that all libata drivers have migrated to use the error_handler callback, remove the deprecated phy_reset and eng_timeout callbacks. Also remove references to non-existent functions sata_phy_reset and ata_qc_timeout from Documentation/driver-api/libata.rst. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 89329c7 commit 6b4f165

3 files changed

Lines changed: 7 additions & 24 deletions

File tree

Documentation/driver-api/libata.rst

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,6 @@ advanced drivers implement their own ``->qc_issue``.
256256
Exception and probe handling (EH)
257257
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
258258

259-
::
260-
261-
void (*eng_timeout) (struct ata_port *ap);
262-
void (*phy_reset) (struct ata_port *ap);
263-
264-
265-
Deprecated. Use ``->error_handler()`` instead.
266-
267259
::
268260

269261
void (*freeze) (struct ata_port *ap);
@@ -348,8 +340,7 @@ SATA phy read/write
348340
u32 val);
349341

350342

351-
Read and write standard SATA phy registers. Currently only used if
352-
``->phy_reset`` hook called the :c:func:`sata_phy_reset` helper function.
343+
Read and write standard SATA phy registers.
353344
sc_reg is one of SCR_STATUS, SCR_CONTROL, SCR_ERROR, or SCR_ACTIVE.
354345

355346
Init and shutdown
@@ -520,13 +511,12 @@ to return without deallocating the qc. This leads us to
520511

521512
:c:func:`ata_scsi_error` is the current ``transportt->eh_strategy_handler()``
522513
for libata. As discussed above, this will be entered in two cases -
523-
timeout and ATAPI error completion. This function calls low level libata
524-
driver's :c:func:`eng_timeout` callback, the standard callback for which is
525-
:c:func:`ata_eng_timeout`. It checks if a qc is active and calls
526-
:c:func:`ata_qc_timeout` on the qc if so. Actual error handling occurs in
527-
:c:func:`ata_qc_timeout`.
514+
timeout and ATAPI error completion. This function will check if a qc is active
515+
and has not failed yet. Such a qc will be marked with AC_ERR_TIMEOUT such that
516+
EH will know to handle it later. Then it calls low level libata driver's
517+
:c:func:`error_handler` callback.
528518

529-
If EH is invoked for timeout, :c:func:`ata_qc_timeout` stops BMDMA and
519+
When the :c:func:`error_handler` callback is invoked it stops BMDMA and
530520
completes the qc. Note that as we're currently in EH, we cannot call
531521
scsi_done. As described in SCSI EH doc, a recovered scmd should be
532522
either retried with :c:func:`scsi_queue_insert` or finished with

drivers/ata/pata_sl82c105.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ static void sl82c105_bmdma_start(struct ata_queued_cmd *qc)
180180
* document.
181181
*
182182
* This function is also called to turn off DMA when a timeout occurs
183-
* during DMA operation. In both cases we need to reset the engine,
184-
* so no actual eng_timeout handler is required.
183+
* during DMA operation. In both cases we need to reset the engine.
185184
*
186185
* We assume bmdma_stop is always called if bmdma_start as called. If
187186
* not then we may need to wrap qc_issue.

include/linux/libata.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -975,12 +975,6 @@ struct ata_port_operations {
975975
ssize_t (*transmit_led_message)(struct ata_port *ap, u32 state,
976976
ssize_t size);
977977

978-
/*
979-
* Obsolete
980-
*/
981-
void (*phy_reset)(struct ata_port *ap);
982-
void (*eng_timeout)(struct ata_port *ap);
983-
984978
/*
985979
* ->inherits must be the last field and all the preceding
986980
* fields must be pointers.

0 commit comments

Comments
 (0)