From: Tejun Heo <tj@kernel.org>
To: Loc Ho <lho@apm.com>
Cc: David Milburn <dmilburn@redhat.com>,
"olof@lixom.net" <olof@lixom.net>,
"arnd@arndb.de" <arnd@arndb.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"jcm@redhat.com" <jcm@redhat.com>,
"patches@apm.com" <patches@apm.com>, Tuan Phan <tphan@apm.com>,
Suman Tripathi <stripathi@apm.com>
Subject: Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver
Date: Tue, 14 Jan 2014 11:03:12 -0500 [thread overview]
Message-ID: <20140114160312.GH12131@htj.dyndns.org> (raw)
In-Reply-To: <CAPw-ZT=A=c9-3BfP-LoDBXByQqfvATpAdS4NPPWB9+R1+GHfDA@mail.gmail.com>
Hey,
On Tue, Jan 14, 2014 at 07:57:19AM -0800, Loc Ho wrote:
> > No, they don't and the comments in your driver don't really explain
> > what's going on. Why are we having retry loops inside hardreset
> > itself? This can prolong recovery time significantly in corner cases.
> > Why is this necessary?
>
> There are two retry in the hardreset. The first retry is due to the
> requirement to have slightly modified PHY setting for different speed
> of the attached disk. The default is Gen3. If it is Gen1 or Gen2 disk
> attached, HW will require slightly modified PHY setting. The second
> retry is due to the fact that link may not link up the first time due
> to HW errata. For the initial version, I will remove the second retry
> and submit an separate patch.
And please explain what's going on in more detail in the comments.
> > * If your driver needs to append or prepent something to the existing
> > one, export the existing one and then wrap that one with the extra
> > logic around it. Do not copy function body unnecessarily. Even for
> > the port_interrupt, it looks like you can just call the flush after
> > invoking the normal ahci_handle_port_interrupt(), no?
>
> As mentioned, the flush requires immediately after reading the CI.
> Otherwise, there is still an chance that the command is completed and
> the OS notified the upper layer while the data is still in flight. For
> the initial version, I will remove the flush (IRQ wrapper) and submit
> separate patch.
The function is called with ap->lock held. Nothing can happen
inbetween.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-01-14 16:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 18:11 [PATCH v8 0/4] ata: Add APM X-Gene SoC SATA host controller support Loc Ho
2014-01-06 18:11 ` [PATCH v8 1/4] ata: Export required functions by APM X-Gene SATA driver Loc Ho
2014-01-06 18:12 ` [PATCH v8 2/4] Documentation: Add documentation for APM X-Gene SoC SATA host controller DTS binding Loc Ho
2014-01-06 18:12 ` [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver Loc Ho
2014-01-06 18:12 ` [PATCH v8 4/4] arm64: Add APM X-Gene SoC SATA host controller DTS entries Loc Ho
2014-01-10 19:45 ` [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver David Milburn
2014-01-10 20:07 ` David Milburn
2014-01-11 19:31 ` Tejun Heo
2014-01-12 3:58 ` Loc Ho
2014-01-12 11:49 ` Tejun Heo
2014-01-13 4:01 ` Loc Ho
2014-01-13 16:08 ` Tejun Heo
2014-01-14 15:57 ` Loc Ho
2014-01-14 16:03 ` Tejun Heo [this message]
2014-01-14 16:04 ` Tejun Heo
2014-01-14 16:21 ` Loc Ho
2014-01-14 16:30 ` Tejun Heo
[not found] ` <20140114163008.GJ12131-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-01-14 16:37 ` Loc Ho
2014-01-14 16:46 ` Tejun Heo
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=20140114160312.GH12131@htj.dyndns.org \
--to=tj@kernel.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dmilburn@redhat.com \
--cc=jcm@redhat.com \
--cc=lho@apm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=olof@lixom.net \
--cc=patches@apm.com \
--cc=stripathi@apm.com \
--cc=tphan@apm.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).