diff options
| author | Damien Le Moal <dlemoal@kernel.org> | 2025-07-16 11:03:14 +0900 |
|---|---|---|
| committer | Niklas Cassel <cassel@kernel.org> | 2025-07-16 09:31:43 +0200 |
| commit | a4daf088a77323154514eb1f8626bbdf9329cfd4 (patch) | |
| tree | 103ae550d907444691fe6cbc31edd2608e191f97 /drivers/ata/ahci_da850.c | |
| parent | df6f9a918ea856fc288b9001b0414c5be136d7d0 (diff) | |
| download | linux-next-a4daf088a77323154514eb1f8626bbdf9329cfd4.tar.gz linux-next-a4daf088a77323154514eb1f8626bbdf9329cfd4.zip | |
ata: libata-eh: Simplify reset operation management
Introduce struct ata_reset_operations to aggregate in a single structure
the definitions of the 4 reset methods (prereset, softreset, hardreset
and postreset) for a port. This new structure is used in struct ata_port
to define the reset methods for a regular port (reset field) and for a
port-multiplier port (pmp_reset field). A pointer to either of these
fields replaces the 4 reset method arguments passed to ata_eh_recover()
and ata_eh_reset().
The definition of the reset methods for all drivers is changed to use
the reset and pmp_reset fields in struct ata_port_operations.
A large number of files is modifed, but no functional changes are
introduced.
Suggested-by: Niklas Cassel <cassel@kernel.org>
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-3-dlemoal@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_da850.c')
| -rw-r--r-- | drivers/ata/ahci_da850.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index ca0924dc5bd2..f97566c420f8 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -137,13 +137,13 @@ static int ahci_da850_hardreset(struct ata_link *link, static struct ata_port_operations ahci_da850_port_ops = { .inherits = &ahci_platform_ops, - .softreset = ahci_da850_softreset, + .reset.softreset = ahci_da850_softreset, /* * No need to override .pmp_softreset - it's only used for actual * PMP-enabled ports. */ - .hardreset = ahci_da850_hardreset, - .pmp_hardreset = ahci_da850_hardreset, + .reset.hardreset = ahci_da850_hardreset, + .pmp_reset.hardreset = ahci_da850_hardreset, }; static const struct ata_port_info ahci_da850_port_info = { |
