From: Phillip Susi <phill@thesusis.net>
To: Damien Le Moal <dlemoal@kernel.org>, linux-ide@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH 2/2] ata: libata-core: Improve ata_dev_power_set_active()
Date: Fri, 13 Oct 2023 11:14:09 -0400 [thread overview]
Message-ID: <87y1g6ftby.fsf@vps.thesusis.net> (raw)
In-Reply-To: <20231012071800.468868-3-dlemoal@kernel.org>
Damien Le Moal <dlemoal@kernel.org> writes:
> /**
> * ata_dev_power_set_active - Set a device power mode to active
> * @dev: target device
> @@ -2065,6 +2092,13 @@ void ata_dev_power_set_active(struct ata_device *dev)
> if (!ata_dev_power_init_tf(dev, &tf, true))
> return;
>
> + /*
> + * Check the device power state & condition and force a spinup with
> + * VERIFY command only if the drive is not already ACTIVE or IDLE.
> + */
> + if (ata_dev_power_is_active(dev))
> + return;
> +
> ata_dev_notice(dev, "Entering active power mode\n");
>
> err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
This bit didn't apply cleanly to what I just pulled from Linus. It
seems there are soem differences in how the tf is set up. Why not move
this check to before the tf is set up? There isn't much point in
setting it up if it isn't going to be used.
next prev parent reply other threads:[~2023-10-13 15:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 7:17 [PATCH 0/2] Improve drive spinup on resume Damien Le Moal
2023-10-12 7:17 ` [PATCH 1/2] ata: libata-eh: Spinup disk on resume after revalidation Damien Le Moal
2023-10-12 11:03 ` Niklas Cassel
2023-10-12 7:18 ` [PATCH 2/2] ata: libata-core: Improve ata_dev_power_set_active() Damien Le Moal
2023-10-12 11:07 ` Niklas Cassel
2023-10-13 8:51 ` Niklas Cassel
2023-10-13 15:14 ` Phillip Susi [this message]
2023-10-13 20:12 ` Niklas Cassel
2023-10-15 22:12 ` Damien Le Moal
2023-10-12 11:47 ` [PATCH 0/2] Improve drive spinup on resume Geert Uytterhoeven
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=87y1g6ftby.fsf@vps.thesusis.net \
--to=phill@thesusis.net \
--cc=dlemoal@kernel.org \
--cc=geert@linux-m68k.org \
--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