From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <tj@kernel.org>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>, vbotka@novell.com
Subject: Re: [PATCH #upstream-fixes] libata: clear ering on resume
Date: Mon, 11 May 2009 14:34:39 -0400 [thread overview]
Message-ID: <4A086FBF.7020901@garzik.org> (raw)
In-Reply-To: <49EFBC80.6070109@kernel.org>
Tejun Heo wrote:
> Error timestamps are in jiffies which doesn't run while suspended and
> PHY events during resume isn't too uncommon. When the two are
> combined, it can lead to unnecessary speed downs if the machine is
> suspended and resumed repeatedly. Clear error history on resume.
>
> This was reported and verified in bnc#486803 by Vladimir Botka.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Vladimir Botka <vbotka@novell.com>
> ---
> drivers/ata/libata-eh.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 0183131..ff0f496 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -3494,6 +3494,8 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)
> */
> static void ata_eh_handle_port_resume(struct ata_port *ap)
> {
> + struct ata_link *link;
> + struct ata_device *dev;
> unsigned long flags;
> int rc = 0;
>
> @@ -3508,6 +3510,17 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
>
> WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED));
>
> + /*
> + * Error timestamps are in jiffies which doesn't run while
> + * suspended and PHY events during resume isn't too uncommon.
> + * When the two are combined, it can lead to unnecessary speed
> + * downs if the machine is suspended and resumed repeatedly.
> + * Clear error history.
> + */
> + ata_for_each_link(link, ap, HOST_FIRST)
> + ata_for_each_dev(dev, link, ALL)
> + ata_ering_clear(&dev->ering);
> +
> ata_acpi_set_state(ap, PMSG_ON);
applied
prev parent reply other threads:[~2009-05-11 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 0:55 [PATCH #upstream-fixes] libata: clear ering on resume Tejun Heo
2009-05-11 18:34 ` Jeff Garzik [this message]
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=4A086FBF.7020901@garzik.org \
--to=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
--cc=vbotka@novell.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).