From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Lord <liml@rtr.ca>
Cc: Tejun Heo <htejun@gmail.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/5] sil24: use SRST for phy_reset
Date: Wed, 16 Nov 2005 10:03:34 -0500 [thread overview]
Message-ID: <437B4A46.4070501@pobox.com> (raw)
In-Reply-To: <437B462F.80205@rtr.ca>
Mark Lord wrote:
> Tejun Heo wrote:
>
>> There seems to be no way to obtain device signature from sil24 after
>> SATA phy reset and SRST is needed anyway for later port multiplier
>> suppport. This patch converts sil24_phy_reset to use SRST instaed.
>
>
> Mmm.. I doubt that sil24 is the only SATA controller with
> this issue. The sata_qstor device, for example, requires PHY reset
> *followed* by SRST if one wants to reliably detect a port multiplier.
>
> Maybe the chipset drivers should simply do PHY / SRST as they're told,
> and have libata-core ensure PHY + SRST before doing PM detection?
Well, there is a hardware-dependent component, and a PM-dependent component.
Hardware: some controller hardware cannot reliably provide the
signature from the post-COMRESET D2H Register FIS to the OS driver, so
an SRST is required in any case.
PM: The SATA PM docs clearly state in two places, that SRST should be
used to obtain the port multiplier signature, and from there proceed
with probing.
Thus, if we take the docs at face value, it sounds like sata reset
should look like
take iface active (write 0x300 to scontrol)
poll sstatus for device detection
clear serror
issue srst
get signature
do useful stuff with signature
That's also a bit nicer to the hardware too, for two reasons:
* COMRESET in general is a hard reset
* often, advanced host controllers issue COMRESET anyway, so we're
likely doing it twice
Patches welcome ;-) I am a bit nervous about making this change
globally, since some early phys may need a COMRESET kick (0x301 to
SControl)... so maybe we could phase this in on the advanced
controllers first (libata's API permits this), and then roll it out to
the dumber controllers if nothing breaks.
Jeff
prev parent reply other threads:[~2005-11-16 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 8:05 [PATCH 3/5] sil24: use SRST for phy_reset Tejun Heo
2005-11-16 12:28 ` Jeff Garzik
2005-11-16 13:24 ` Tejun Heo
2005-11-16 14:46 ` Mark Lord
2005-11-16 15:03 ` 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=437B4A46.4070501@pobox.com \
--to=jgarzik@pobox.com \
--cc=htejun@gmail.com \
--cc=liml@rtr.ca \
--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;
as well as URLs for NNTP newsgroup(s).