aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorDamien Le Moal <[email protected]>2025-07-16 02:03:13 +0000
committerNiklas Cassel <[email protected]>2025-07-16 07:31:43 +0000
commitdf6f9a918ea856fc288b9001b0414c5be136d7d0 (patch)
treee298cf44807d4e60bec9f42ace33f663eaa8ffbb /lib/crypto/mpi/mpi-sub-ui.c
parentata: pata_rdc: Use registered definition for the RDC vendor (diff)
downloadkernel-df6f9a918ea856fc288b9001b0414c5be136d7d0.tar.gz
kernel-df6f9a918ea856fc288b9001b0414c5be136d7d0.zip
ata: libata-eh: Remove ata_do_eh()
The only reason for ata_do_eh() to exist is that the two caller sites, ata_std_error_handler() and ata_sff_error_handler() may pass it a NULL hardreset operation so that the built-in (generic) hardreset operation for a driver is ignored if the adapter SCR access is not available. However, ata_std_error_handler() and ata_sff_error_handler() modifications of the hardreset port operation can easily be combined as they are mutually exclusive. That is, a driver using sata_std_hardreset() as its hardreset operation cannot use sata_sff_hardreset() and vice-versa. With this observation, ata_do_eh() can be removed and its code moved to ata_std_error_handler(). The condition used to ignore the built-in hardreset port operation is modified to be the one that was used in ata_sff_error_handler(). This requires defining a stub for the function sata_sff_hardreset() to avoid compilation errors when CONFIG_ATA_SFF is not enabled. Furthermore, instead of modifying the local hardreset operation definition, set the ATA_LFLAG_NO_HRST link flag to prevent the use of built-in hardreset methods for ports without a valid scr_read function. This flag is checked in ata_eh_reset() and if set, the hardreset method is ignored. This change simplifies ata_sff_error_handler() as this function now only needs to call ata_std_error_handler(). No functional changes. Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions