From: Tejun Heo <htejun@gmail.com>
To: Albert Lee <albertcc@tw.ibm.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Doug Maxey <dwm@maxeymade.com>, Brian King <brking@us.ibm.com>
Subject: Re: irq-pio branch updated with Tejun's patches
Date: Thu, 09 Feb 2006 12:58:51 +0900 [thread overview]
Message-ID: <43EABDFB.8000505@gmail.com> (raw)
In-Reply-To: <43EAB5BA.3050204@tw.ibm.com>
Hello, Albert.
Albert Lee wrote:
>>
>>This is sort of OT, but would it be possible to separate PIO
>>issuing/interrupt handling from ata_qc_issue_prot and ata_host_intr?
>>
>
> Isn't overriding the ->qc_issue() and ->irq_handle() in LLDD good enough?
The driver needs its own ->qc_issue() and ->irq_handler() but it also
needs PIO support. AFAICS, the current PIO implementation is rather
strongly tied into ata_qc_issue_prot() and ata_host_intr() making it
difficult to use PIO support in drivers which use private ->qc_issue()
and ->irq_handler(). So, what I was asking was to separate out PIO
handling from ata_qc_issue_prot() and ata_host_intr() such that other
issue and intr routines can use PIO.
>
> How about refactoring the PCI-IDE specific logic from libata-core to a
> seperate source file, say, ata_pciide.c?
>
> Currently we have many PCI-IDE specific driving logic in libata-core.c.
> Maybe we can seperate the different driving logic required by different
> hardware interface into different source files?
> This could make libata-core.c to be more abstract and generic from the underlying
> hardware: libata-core only knows about the ata_port_operations interface.
> (ata_port_operations should be generic enough to cover all the hardware types.)
> LLDDs can either select default implementation for its hardware interface type
> (such as ata_bmdma_setup() from ata_pciide.c) or override harddware specfic functions.
I agree. If for nothing else, the size of libata-core.c is getting too
large. Also, we currently have multiple levels of methods in
ata_port_operations, some operations are only used by other operations,
which is a bit confusing I think.
Separating out traditional driving logic from libata-core.c would
require another level of indirection such that traditional low level
drivers still can mix & match different legacy operations. I thought
about it and wasn't really sure whether the added abstraction was worth
the clean up. We currently don't have too many controllers which are
legacy-free, it seems.
> Ex. hardware interface types:
> - PCI IDE (bmdma + PRD tables)
> (covers legacy taskfile registers interface) => ata_pciide.c
> - ADMA => pdc_adma.c
> - AHCI => ahci.c
> - Initio => sata_initio.c (ata_qc_issue_pio and ata_qc_pio_intr implementation here)
ata_qc_issue_pio was bad naming probably. As I wrote before, I was
asking for a PIO helper which inic_qc_issue() can call to drive PIO
logic and the same for ata_qc_pio_intr().
> - SAS/SATA => sata_sas.c (ata_sas_port_start/stop implementation here)
> - etc.
Thanks.
--
tejun
next prev parent reply other threads:[~2006-02-09 3:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 14:23 irq-pio branch updated with Tejun's patches Jeff Garzik
2006-02-08 8:25 ` Albert Lee
2006-02-08 8:34 ` [PATCH 0/4] libata-dev: minor fix for irq-pio with Tejun's EH patches Albert Lee
2006-02-08 8:37 ` [PATCH 1/4] libata-dev: Fix array index value in ata_rwcmd_protocol() Albert Lee
2006-02-09 9:26 ` Jeff Garzik
2006-02-08 8:48 ` [PATCH 2/4] libata-dev: Use new ata_queue_pio_task() for PIO polling task Albert Lee
2006-02-08 8:50 ` [PATCH 3/4] libata-dev: Use new AC_ERR_* flags Albert Lee
2006-02-08 8:51 ` [PATCH 4/4] libata-dev: Minor comment fix Albert Lee
2006-02-08 8:46 ` irq-pio branch updated with Tejun's patches Tejun Heo
2006-02-09 3:23 ` Albert Lee
2006-02-09 3:58 ` Tejun Heo [this message]
2006-02-09 9:21 ` Jeff Garzik
2006-02-09 9:31 ` Tejun
2006-02-09 9:17 ` Jeff Garzik
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=43EABDFB.8000505@gmail.com \
--to=htejun@gmail.com \
--cc=albertcc@tw.ibm.com \
--cc=brking@us.ibm.com \
--cc=dwm@maxeymade.com \
--cc=jgarzik@pobox.com \
--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).