From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: Mikael Pettersson <mikpe@it.uu.se>,
arnd@arndb.de, linuxppc-dev@ozlabs.org,
linux-ide@vger.kernel.org, paulus@samba.org,
alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] driver/ata: PATA driver for Celleb
Date: Thu, 25 Jan 2007 14:45:23 +1100 [thread overview]
Message-ID: <1169696724.24996.45.camel@localhost.localdomain> (raw)
In-Reply-To: <45B805E1.1030906@garzik.org>
On Wed, 2007-01-24 at 20:20 -0500, Jeff Garzik wrote:
> Akira Iguchi wrote:
> > This is the patch for PATA controller of Celleb.
> > It depends on the previous "add another IRQ calls" patch.
> >
> > Because this driver needs special taskfile accesses, there is
> > a copy of ata_std_softreset(). ata_dev_try_classify() is exported
> > so that it can be used in this function.
> >
> > Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> > Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
>
> The driver looks OK, the only thing I wonder is: can you use the iomap
> interface to eliminate the rest of the duplicated code?
>
> See Tejun's latest patchset "[PATCHSET] Managed device resources, take
> #3" which completes the conversion of libata to using the lib/iomap.c
> interface.
That would be a bit nasty :-) The powerpc kernel can have any number of
platforms compiled into the same kernel. Some of the base things, like
PCI IOs, iomap, etc... are common to all platforms. In this case, what
they want is hook only accesses on one given device, one one given
platform (or rather, on all platforms using that device, which is even
worse, it's not even platform specific, at least not in theory).
While we do now provide a mecanism to add hooks to all PCI MMIO and IO
accessors (to workaround HW bugs on some chipsets), again, it would be a
a serious abuse to have a driver hook on that to change the access
method on a given device :-)
How much copied code remains ? I wonder if the accesses to nsect/lba for
example can be done using the taskfile accessors, possibly with a new
flag indicating to only read/write those 2 registers ?
Ben.
prev parent reply other threads:[~2007-01-25 3:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-17 9:24 [PATCH 2/4] libata-core.c: add another IRQ calls Mikael Pettersson
2007-01-17 16:49 ` Jeff Garzik
2007-01-17 20:31 ` Mikael Pettersson
2007-01-18 0:55 ` Akira Iguchi
[not found] ` <200701180055.l0I0tl6M021051@toshiba.co.jp>
2007-01-18 1:29 ` [PATCH] driver/ata: PATA driver for Celleb Akira Iguchi
2007-01-25 1:17 ` [PATCH 2/4] libata-core.c: add another IRQ calls Jeff Garzik
[not found] ` <200701180129.l0I1TL48013407@toshiba.co.jp>
2007-01-25 1:20 ` [PATCH] driver/ata: PATA driver for Celleb Jeff Garzik
2007-01-25 3:45 ` Benjamin Herrenschmidt [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=1169696724.24996.45.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikpe@it.uu.se \
--cc=paulus@samba.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).