IDE & byte-swapping in 2.4.21
linas at austin.ibm.com
linas at austin.ibm.com
Thu May 22 06:55:44 EST 2003
On Wed, May 21, 2003 at 11:09:43AM +0200, Benjamin Herrenschmidt wrote:
>
> >
> > > There's just enough mapping and redirection & etc. in this code that
> > > I haven't quite figured out what the intent was, and therefore, haven't
> > > really figured out what the right fix is ... is it in the ide code?
> > > In the ppc64-specific code? Am I the only big-endian platform with
> > > this problem? Have other big-endian platforms tested?
> >
> > No, yes, probably, yes. IDE works fine on ppc32 (except for the
> > problems with CF cards on powerbooks with IDE interfaces with no
> > attached drives, but that's another story).
>
> One thing too here is why would you end up using the "mm" versions of
> the IOPs ? By default, IDE uses the "pio" versions (the one doing insw/
> outsw) and those should work fine for "normal" (read: common PCI)
> controllers. Unless you have a special memory mapped controller, like
> we have on pmac, you don't need the "mm" versions and the IDE code 'as is'
> should not have used them.
I'm working with 2.4.21 pre4 which does things like
grep mm_insw *.c
ide-iops.c: hwif->INSW = ide_mm_insw;
I've hardly studied the code, but it looks like hwif->INSW is
used as the default by all the drivers. Maybe I'm mistaken.
In addition, I also happen to be using a card that ends up with the
siimage driver, which explictly calls __ide_mm_insw.
I haven't tried it yet, but I'm guessing that implementing
the __ide_mm_insw to be non-swapping on the ppc64 will cure my
ills. If that is really the right thing to do. I still don't
understand why a generic #ifdef BIG_ENDIAN in
include/asm-generic/ide_iops.h isn't enough. After all,
someone thought that this was a suitable generic implementation?
--linas
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list