From: Damien Le Moal <dlemoal@kernel.org>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/6] ata: remove reference to non-existing error_handler()
Date: Mon, 15 May 2023 16:01:44 +0900 [thread overview]
Message-ID: <b6e3d385-1371-9331-cd64-28b59a4c0fe6@kernel.org> (raw)
In-Reply-To: <20230510225211.111113-2-hare@suse.de>
On 5/11/23 07:52, Hannes Reinecke wrote:
> With commit 65a15d6560df ("scsi: ipr: Remove SATA support") all
> libata drivers now have the error_handler() callback provided,
> so we can stop checking for non-existing error_handler callback.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/ata/libata-core.c | 158 ++++++++++++++------------------------
> drivers/ata/libata-eh.c | 148 +++++++++++++++--------------------
> drivers/ata/libata-sata.c | 5 +-
> drivers/ata/libata-scsi.c | 21 ++---
> drivers/ata/libata-sff.c | 32 +++-----
> 5 files changed, 139 insertions(+), 225 deletions(-)
>
[...]
> - case ATA_CMD_SLEEP:
> - dev->flags |= ATA_DFLAG_SLEEPING;
> + trace_ata_qc_complete_done(qc);
> + /* Some commands need post-processing after successful
> + * completion.
> + */
While at it, can you fix this comment style ?
It may actually fit on one line...
[...]
> + /* Exception might have happened after ->error_handler
> + * recovered the port but before this point. Repeat
> + * EH in such case.
> + */
Same here. Multi-line comment format...
[...]
> - /* end eh (clear host_eh_scheduled) while holding
> - * ap->lock such that if exception occurs after this
> - * point but before EH completion, SCSI midlayer will
> - * re-initiate EH.
> - */
> - ap->ops->end_eh(ap);
> + /* end eh (clear host_eh_scheduled) while holding
> + * ap->lock such that if exception occurs after this
> + * point but before EH completion, SCSI midlayer will
> + * re-initiate EH.
> + */
And here.
[...]
> diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c
> index f3e7396e3191..bd2a754b645c 100644
> --- a/drivers/ata/libata-sata.c
> +++ b/drivers/ata/libata-sata.c
> @@ -1138,11 +1138,8 @@ EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
> int ata_sas_port_start(struct ata_port *ap)
> {
> /*
> - * the port is marked as frozen at allocation time, but if we don't
> - * have new eh, we won't thaw it
> + * the port is marked as frozen at allocation time
> */
This one can be a single line comment, no ?
[...]
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 9d28badfe41d..aa286d48e847 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -883,31 +883,23 @@ static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
> {
> struct ata_port *ap = qc->ap;
>
> - if (ap->ops->error_handler) {
> - if (in_wq) {
> - /* EH might have kicked in while host lock is
> - * released.
> - */
> - qc = ata_qc_from_tag(ap, qc->tag);
> - if (qc) {
> - if (likely(!(qc->err_mask & AC_ERR_HSM))) {
> - ata_sff_irq_on(ap);
> - ata_qc_complete(qc);
> - } else
> - ata_port_freeze(ap);
> - }
> - } else {
> - if (likely(!(qc->err_mask & AC_ERR_HSM)))
> + if (in_wq) {
> + /* EH might have kicked in while host lock is
> + * released.
> + */
Comment format again.
Also, please add linux-scsi and John to the distribution list when resending.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2023-05-15 7:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 22:52 [PATCH 0/6] libata: remove references to 'old' error handler Hannes Reinecke
2023-05-10 22:52 ` [PATCH 1/6] ata: remove reference to non-existing error_handler() Hannes Reinecke
2023-05-15 7:01 ` Damien Le Moal [this message]
2023-05-15 10:09 ` Niklas Cassel
2023-05-23 2:25 ` kernel test robot
2023-05-10 22:52 ` [PATCH 2/6] ata,scsi: remove ata_sas_port_{start,stop} callbacks Hannes Reinecke
2023-05-10 22:52 ` [PATCH 3/6] ata,scsi: remove ata_sas_port_destroy() Hannes Reinecke
2023-05-10 22:52 ` [PATCH 4/6] ata: remove ata_sas_sync_probe() Hannes Reinecke
2023-05-10 22:52 ` [PATCH 5/6] ata: inline ata_port_probe() Hannes Reinecke
2023-05-10 22:52 ` [PATCH 6/6] ata,scsi: cleanup ata_port_probe() Hannes Reinecke
2023-05-22 0:46 ` [PATCH 0/6] libata: remove references to 'old' error handler Damien Le Moal
2023-05-22 6:46 ` Hannes Reinecke
2023-06-05 14:43 ` Niklas Cassel
2023-06-05 15:09 ` Niklas Cassel
2023-06-05 15:12 ` Hannes Reinecke
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=b6e3d385-1371-9331-cd64-28b59a4c0fe6@kernel.org \
--to=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=linux-ide@vger.kernel.org \
/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