From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Gwendal Grignou <gwendal@google.com>
Cc: mihrcke@gmail.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: Allow SOFT_RESET for Sil3726
Date: Thu, 06 Oct 2011 14:42:46 +0400 [thread overview]
Message-ID: <4E8D8626.6070000@mvista.com> (raw)
In-Reply-To: <1317881037-11831-1-git-send-email-gwendal@google.com>
Hello.
On 06-10-2011 10:03, Gwendal Grignou wrote:
> Allow controllers to send SOFT_RESET to Sil3726 PMP.
> This PMP does not accept frames until the drive connected to
> its port spins up.
> Some controller [Sil3132 family] can not wait for the drive to spinup
> and fails the reset, leading to unnecessary speed downgrade.
> Not allowing to send SOFT_RESET can lead some drive slow to spinup
> to be ignored and produces weird error messages.
> This fix allows the error handler to wait if the controller is unable
> to send a SOFT_RESET.
> Change-Id: I7eeea152facb4b76e5c69cfde5ef8188874fbaba
Please get rid of this line, it has no place in the upstream commit.
> Signed-off-by: Gwendal Grignou<gwendal@google.com>
> ---
> drivers/ata/libata-eh.c | 11 ++++++++++-
> drivers/ata/libata-pmp.c | 10 ++++------
> include/linux/libata.h | 1 +
> 3 files changed, 15 insertions(+), 7 deletions(-)
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 49af350..60223c3 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2805,7 +2805,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
> sata_scr_read(link, SCR_STATUS,&sstatus))
> rc = -ERESTART;
>
> - if (rc == -ERESTART || try>= max_tries)
> + if (try>= max_tries)
> + goto out;
> +
> + /* Some PMP will not serve SRST until the disk is spunup,
> + * if the controller can not wait for the PMP to acknowledge the frame,
> + * wait here */
The preferred multi-line comment style:
/*
* bla
* bla
*/
> + if (rc == -ERESTART&&
> + !((lflags& ATA_LFLAG_WAIT_SRST)&& (reset == softreset)))
> goto out;
>
> now = jiffies;
[...]
> diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
> index ad0e71d..5fbbe2f 100644
> --- a/drivers/ata/libata-pmp.c
> +++ b/drivers/ata/libata-pmp.c
> @@ -365,13 +365,11 @@ static void sata_pmp_quirks(struct ata_port *ap)
> if (vendor == 0x1095&& devid == 0x3726) {
> /* sil3726 quirks */
> ata_for_each_link(link, ap, EDGE) {
> - /* Class code report is unreliable and SRST
> - * times out under certain configurations.
> - */
> + /* Class code report is unreliable */
> + /* PMP does not forward SRST until the drive spins up */
> if (link->pmp < 5)
> - link->flags |= ATA_LFLAG_NO_SRST |
> - ATA_LFLAG_ASSUME_ATA;
> -
Why remove the empty line?
> + link->flags |= ATA_LFLAG_ASSUME_ATA |
> + ATA_LFLAG_WAIT_SRST;
> /* port 5 is for SEMB device and it doesn't like SRST */
> if (link->pmp == 5)
> link->flags |= ATA_LFLAG_NO_SRST |
WBR, Sergei
next prev parent reply other threads:[~2011-10-06 10:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <359604ECF8F440408B9634E6146249B42923805F@mail.scl.local>
[not found] ` <20110628095723.GC3386@htj.dyndns.org>
2011-06-30 17:53 ` Problem w/ hotplug on sata_sil24 w/ PMP (sil3726) Derry Bryson
2011-07-12 15:01 ` tj
2011-07-12 19:21 ` Derry Bryson
2011-07-13 13:34 ` tj
2011-07-13 14:39 ` tj
2011-07-13 16:23 ` Derry Bryson
2011-07-14 7:14 ` tj
2011-07-14 17:37 ` Derry Bryson
2011-07-21 9:00 ` tj
2011-07-21 16:22 ` Derry Bryson
2011-07-22 9:50 ` tj
2011-07-22 17:29 ` Derry Bryson
2011-07-22 19:34 ` Derry Bryson
2011-07-30 12:54 ` tj
2011-09-30 21:54 ` Mike I
2011-10-06 5:48 ` Gwendal Grignou
2011-10-06 6:03 ` [PATCH] libata: Allow SOFT_RESET for Sil3726 Gwendal Grignou
2011-10-06 8:03 ` Tejun Heo
2011-10-06 20:44 ` Gwendal Grignou
2011-10-06 22:10 ` Tejun Heo
2011-10-12 14:03 ` Mark Lord
2011-10-20 0:02 ` [PATCH] [libata]Issue SRST to Sil3726 PMP Gwendal Grignou
2011-10-20 0:02 ` Gwendal Grignou
2011-10-20 0:07 ` Tejun Heo
2011-10-20 0:28 ` Gwendal Grignou
2011-10-20 0:17 ` Gwendal Grignou
2011-10-20 0:17 ` Gwendal Grignou
2011-10-20 0:35 ` [PATCH] [libata]Send SRST to disks behind " Gwendal Grignou
2011-10-20 0:35 ` [PATCH] [libata]Issue SRST to Disks behind Sil3726 Gwendal Grignou
2011-10-20 0:37 ` Tejun Heo
2011-10-06 10:42 ` Sergei Shtylyov [this message]
[not found] ` <CAMHSBOV8rSW3jumpx8URZrgo8w1He9zruP7yAOw7uhQOaAj3Xg@mail.gmail.com>
2011-10-06 6:07 ` Problem w/ hotplug on sata_sil24 w/ PMP (sil3726) Gwendal Grignou
2011-10-08 18:25 ` Michael Ihrcke
2011-10-12 2:06 ` Michael Ihrcke
2011-10-13 2:09 ` Mike I
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=4E8D8626.6070000@mvista.com \
--to=sshtylyov@mvista.com \
--cc=gwendal@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=mihrcke@gmail.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).