Subject: Re: Panic: MMU fault :(
To: None <J.D.Coleman@newcastle.ac.uk>
From: maximum entropy <entropy@zippy.bernstein.com>
List: port-atari
Date: 01/05/1998 13:36:23
>From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
>
>PS.  Entropy - I was looking through your code, and I don't understand
>why leoread() and leowrite() both call leomove() with the same parameters.
>Also, I think the sc_dev in the *_softc struct is automatically filled in.
>Other drivers (e.g. sun) appear to use sc_dev.dv_xname, without explicity
>assigning anything to it.

The uiomove() call in leomove() copies in or out based on the
information in the struct uio.  Therefore the read and write entry
points can do the same thing; they simply delegate the work to
uiomove() which will do the right thing in either case.

The leonardo read/write code is actually faulty, but for another
reason.  I took some shortcuts with bus space handles to generate
virtual addresses.  The shortcuts I took work correctly (for now) but
are clearly wrong because my code has no business "knowing" what these
handles mean.  See the recent discussion on tech-kern.

Cheers,
entropy

--
entropy -- it's not just a good idea, it's the second law.