From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
John Garry <john.g.garry@oracle.com>,
Jason Yan <yanaijie@huawei.com>
Subject: Re: [PATCH v4 2/3] ata: libata-eh: Simplify reset operation management
Date: Mon, 14 Jul 2025 09:56:34 +0200 [thread overview]
Message-ID: <aHS4MmhX0W33SxL7@ryzen> (raw)
In-Reply-To: <20250714005454.35802-3-dlemoal@kernel.org>
On Mon, Jul 14, 2025 at 09:54:53AM +0900, Damien Le Moal wrote:
> 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>
> ---
(snip)
> diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c
> index 93ebf566b54e..8de63d889a68 100644
> --- a/drivers/ata/pata_parport/pata_parport.c
> +++ b/drivers/ata/pata_parport/pata_parport.c
> @@ -321,8 +321,7 @@ static void pata_parport_drain_fifo(struct ata_queued_cmd *qc)
> static struct ata_port_operations pata_parport_port_ops = {
> .inherits = &ata_sff_port_ops,
>
> - .softreset = pata_parport_softreset,
> - .hardreset = NULL,
I think you need to add .reset.hardreset = NULL, because pata_parport_port_ops
inherits ata_sff_port_ops, which does set hardreset, so I think this line will
clear the pointer.
> + .reset.softreset = pata_parport_softreset,
>
> .sff_dev_select = pata_parport_dev_select,
> .sff_set_devctl = pata_parport_set_devctl,
Rest looks good to me:
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Tell me if you want to fix it up when applying or if you want to send a new
version.
Kind regards,
Niklas
next prev parent reply other threads:[~2025-07-14 7:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 0:54 [PATCH v4 0/3] libata-eh cleanups Damien Le Moal
2025-07-14 0:54 ` [PATCH v4 1/3] ata: libata-eh: Remove ata_do_eh() Damien Le Moal
2025-07-14 9:12 ` Niklas Cassel
2025-07-14 0:54 ` [PATCH v4 2/3] ata: libata-eh: Simplify reset operation management Damien Le Moal
2025-07-14 7:56 ` Niklas Cassel [this message]
2025-07-14 7:58 ` Damien Le Moal
2025-07-14 9:38 ` Niklas Cassel
2025-07-14 0:54 ` [PATCH v4 3/3] Documentation: driver-api: Update libata error handler information Damien Le Moal
2025-07-14 16:45 ` [PATCH v4 0/3] libata-eh cleanups Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aHS4MmhX0W33SxL7@ryzen \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=john.g.garry@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yanaijie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).