Subject: Re: ncr53cxxx driver design issues
To: Lennart Augustsson <lennart@augustsson.net>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 04/17/2000 20:37:55
On Mon, Apr 17, 2000 at 02:25:22AM +0200, Lennart Augustsson wrote:
> I agree.  Right now it's (almost) impossible to write a driver that is independent
> of the endianness of the bus.  I've made the same observation when writing
> the host controller drivers for USB.  You need to make some data structures
> in memory that will later be accessed by DMA, but to make these have the
> right endianness you need to know then endianness of the bus.  Which is something
> that a bus independent driver cannot have built in.

No but the bus front end knows it, it can pass a flag to the bus independant
driver. The thing is complicated by the fact that some chip can be both
big and little endian, selectable by a pin or a register value (some of
the ncr scsi controllers are endian-configurable, which makes the assersion
PCI == little endian false). So the bus code may not have all data in hands to
decide; it needs to pass the information to the bus front-end which will
take the appropriate decision based on it's knowledge of the chip.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--