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: Mon, 13 Jan 2014 11:08:43 -0500 [thread overview]
Message-ID: <20140113160843.GB29053@htj.dyndns.org> (raw)
In-Reply-To: <CAPw-ZTmfKfPY3DRfJT6FQP78ULwfcjGG76cNfr9yk7UMdrO4wg@mail.gmail.com>
Hello, Loc.
On Sun, Jan 12, 2014 at 08:01:59PM -0800, Loc Ho wrote:
> Yes but Let me summary what overrides are required for this X-Gene
> SATA controller driver:
>
> 1. For Query ID, these two functions - ahci_read_id and ahci_qc_issue
> requires override.
But the comment in ahci_qc_issue() says it's for PMP.
> 2. For PMP support, these two functions - ahci_qc_prep and
> ahci_qc_fill_rtf requires override.
But the only difference between xgene_ahci_do_softreset() and
ahci_do_softreset() is that the former removes fbs handling from the
latter. Why not just turn off HOST_CAP_FBS?
> 3. For softreset, softreset requires override to add additional flags
> in call to ahci_exec_polled_cmd.
which is what? It's the same for the xgene and normal functions.
> 4. For IRQ and ensure data consistent for read operation, function
> ahci_interrupt and ahci_port_intr requires override. But it only
> requires an flush call right after reading from the CI register.
> 5. For hardreset, no need to explain this one as all SATA drivers
> require its only method.
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?
I'm having a lot of trouble understanding what you're trying to do
with your driver. Maybe it'd help to submit as multiple patches where
the first one implements bare minimum to function and then later
patches adding more workarounds to achieve more functionalities? I
can't apply the patch as it currently stands.
Some general comments.
* Let's use fully winged comments for multiline comments.
* I really don't like wrapping basic functions like readl/writel() in
low level drivers.
* 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?
--
tejun
next prev parent reply other threads:[~2014-01-13 16:08 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 [this message]
2014-01-14 15:57 ` Loc Ho
2014-01-14 16:03 ` Tejun Heo
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=20140113160843.GB29053@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).