All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <kernel@teksavvy.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Gwendal Grignou <gwendal@google.com>,
	mihrcke@gmail.com, linux-ide@vger.kernel.org,
	derry@high-rely.com
Subject: Re: [PATCH] libata: Allow SOFT_RESET for Sil3726
Date: Wed, 12 Oct 2011 10:03:11 -0400	[thread overview]
Message-ID: <4E959E1F.20001@teksavvy.com> (raw)
In-Reply-To: <20111006221026.GA7085@google.com>

On 11-10-06 06:10 PM, Tejun Heo wrote:
> Hello,
> 
> On Thu, Oct 06, 2011 at 01:44:27PM -0700, Gwendal Grignou wrote:
>> Yes. Until the device sends the async D2H Reg FIS indicating the drive
>> spun up, the MPM does not accept the SoftRest FIS from the controller.
>> On most controller, that fine, the controller state machine keeps
>> retrying, but on Sil3132 it stops after a second or so and send an
>> error back to the driver.
> 
> I see.
> 
>>> So, now libata waits for full reset period before proceeding to reset
>>> PMP.  Hmmm... yeah, it makes sense.  Unfortunately, the only way to
>>> achieve spinup wait in this case is waiting blindly and libata's reset
>>> timeouts are configured to accomodate drive spinup times.  PMP SCR
>>> failure kinda destroys those blind wait periods.
>>
>> Yes, I totally agree this blind wait is not clean. Normally we would
>> wait until an event occurs [async FIS] and have the timeout just for
>> the error case.
>> Here we wait [10s] because we think the device is spinning up.
> 
> Yes but that's exactly how the reset timeouts are set up.  They're
> supposed to provide reasonable spinup timeouts when the proper wait
> mechanisms can't do so and here it becomes a problem because the blind
> timeouts are circumvented by SCR read failure handling.
> 
>>> I'm not too sure about ATA_LFLAG_WAIT_SRST.  I don't think making the
>>> new behavior default would hurt.
>>
>> I see your point. But if there is no PMP, Sil3132 is behaving, there
>> is no need of this logic.
> 
> Yes, sure, the behavior is necessary iff PMP is attached as that's
> only time SCR read failure can occur anyway and I think it would
> generally be a good idea to always enforce the blind timeouts if PMP
> is attached, so no need for ATA_LFLAG_WAIT_SRST.

I wonder if this same logic is more generally applicable for PMP
rather than sil3132 specific?  What I've read thus far in this thread
sounds very much like the issues I see here with PMPs not working
on JMB and Marvell controllers (where they USED to work fine).

Gwendal, have you got a version of that patch which applies the same
change globally rather than only for sil3132?  I'd like to try it out here.

Thanks

  reply	other threads:[~2011-10-12 14:12 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 [this message]
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                                   ` [PATCH] libata: Allow SOFT_RESET for Sil3726 Sergei Shtylyov
     [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=4E959E1F.20001@teksavvy.com \
    --to=kernel@teksavvy.com \
    --cc=derry@high-rely.com \
    --cc=gwendal@google.com \
    --cc=htejun@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.