[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: eata.c module and PCI setup problem (RAID SCSI card)



Unfortunately the EATA PIO protocol just works for 16 bits transfers,
so inw is the only option. 
le16_to_cpu(inw()) should give the expected result for both BE and LE.
Since the detection routine checks for both "EATA" and "ATAE" signatures,
all should be fine if immediately after the test
if (info.sign == EATA_SIG_LE)
is dropped.
 
I'll add a new boot option which skips ISA and EISA probing  in order
to make the detection more flexible across architectures.

We made one more step, let's see what config data is on the board now.
On i386 the bios put the board in a minimal usable state, on ppc some
other step might be required.

********************************
Ph.D. Dario Ballabio
EMC Computer Systems Italia spa
Mobile phone +393487978851
Office phone +390244571315
Mobile fax   +393487951622

Se un uomo non è disposto a rischiare per le proprie idee,
o le sue idee non valgono niente o non vale niente lui.
---
From: Geert Uytterhoeven [mailto:geert@linux-m68k.org]
Sent: Monday, June 10, 2002 9:53 AM
To: Michel Lanners
Cc: Ballabio_Dario@emc.com; ad.l@delvaux.net; Debian GNU/Linux PPC
Subject: Re: eata.c module and PCI setup problem (RAID SCSI card)


On Sun, 9 Jun 2002, Michel Lanners wrote:
> On   9 Jun, this message from Ballabio_Dario@emc.com echoed through
cyberspace:
> > With this value both the auto detection and the io_port option
> > would give the same (good) behavior.
> > The real problem is that the driver expects the "EATA" signature
> > (big endian) while you get "AEAT". It looks like you have a 16 bit
> > system.
> 
> No, no, this is not about a 16- or 32-bit-system. This is about the way
> the data is read from the device.
> 
> Looking at the struct eata_info that you are reading from the device,
> this looks to me like a stream of bytes of varying size. But you are
> reading it in 16-bit quantities over a byte-swapping barrier: PCI is
> little-endian, powerpc is big-endian. Therefore all data transfers going
> to/coming from the PCI bus are byte-swapped.
> 
> The solution here is to not byteswap the data that you are reading from
> the device, so that the byte stream that you are reading keeps the right
> byte alignment.

If it's a struct, you should read the individual fields using in[bwl](),
depending on their size. Then they will be correctly swapped, and you'll
have
portable code.

> To the debian-powerpc list: what is the correct replacement for inw()
> that doesn't do byteswap?

But that wouldn't be portable across architectures.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like
that.
							    -- Linus
Torvalds


--
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: