Commit df6f9a9
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 <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-2-dlemoal@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>1 parent 148fbaf commit df6f9a9
3 files changed
Lines changed: 21 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4067 | 4067 | | |
4068 | 4068 | | |
4069 | 4069 | | |
4070 | | - | |
| 4070 | + | |
4071 | 4071 | | |
4072 | 4072 | | |
4073 | | - | |
4074 | | - | |
4075 | | - | |
4076 | | - | |
4077 | | - | |
4078 | 4073 | | |
4079 | 4074 | | |
4080 | 4075 | | |
4081 | 4076 | | |
4082 | 4077 | | |
4083 | | - | |
4084 | | - | |
4085 | | - | |
| 4078 | + | |
4086 | 4079 | | |
4087 | | - | |
| 4080 | + | |
| 4081 | + | |
4088 | 4082 | | |
4089 | 4083 | | |
| 4084 | + | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
4090 | 4089 | | |
4091 | 4090 | | |
4092 | 4091 | | |
4093 | | - | |
4094 | | - | |
| 4092 | + | |
| 4093 | + | |
4095 | 4094 | | |
4096 | | - | |
| 4095 | + | |
| 4096 | + | |
| 4097 | + | |
4097 | 4098 | | |
4098 | 4099 | | |
4099 | 4100 | | |
4100 | 4101 | | |
4101 | 4102 | | |
4102 | | - | |
4103 | | - | |
4104 | | - | |
4105 | | - | |
4106 | | - | |
4107 | | - | |
4108 | | - | |
4109 | | - | |
4110 | | - | |
4111 | | - | |
4112 | | - | |
4113 | | - | |
4114 | | - | |
4115 | | - | |
4116 | | - | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | | - | |
4121 | | - | |
4122 | | - | |
4123 | 4103 | | |
4124 | 4104 | | |
4125 | 4105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2054 | 2054 | | |
2055 | 2055 | | |
2056 | 2056 | | |
2057 | | - | |
2058 | | - | |
2059 | 2057 | | |
2060 | 2058 | | |
2061 | 2059 | | |
| |||
2077 | 2075 | | |
2078 | 2076 | | |
2079 | 2077 | | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
| 2078 | + | |
2087 | 2079 | | |
2088 | 2080 | | |
2089 | 2081 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | 1415 | | |
1419 | 1416 | | |
1420 | 1417 | | |
| |||
2152 | 2149 | | |
2153 | 2150 | | |
2154 | 2151 | | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
2155 | 2158 | | |
2156 | 2159 | | |
2157 | 2160 | | |
0 commit comments