Source-Changes archive

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

Re: CVS commit: syssrc/sys



Andrew Doran wrote:
> Jaromir Dolecek <jdolecek%netbsd.org@localhost> wrote:
> 
> > I looked on ic/dpt.c a bit, and it seems the code uses value taken
> > from htobe32() later for copyin(). So it appears it has only
> > chance of working on big endian 32bit machines.
> 
> Read it again. There's no copyin() there, and it was tested on a PC.

OK, copyout(). YKWIM.

The copyout at line 1357 of ic/dpt.c seems  to use address cp_stataddr,
which appears to be initialied to htobe32(cp->sc_stppa) at first
sigh.
 
> The user command packet (ucp) has word sized fields that are in host byte
> order. The packet sent to the device (cp) is big endian. As for the LP64
> stuff, I assumed wrong and will fix that.

Yeah, I now see that the copyout() is used for 'ucp', while htobe32()
macro is used for initialization of member of 'cp'. My bad, sorry
for raising false alarm.

Jaromir
-- 
Jaromir Dolecek <jdolecek%NetBSD.org@localhost>            
http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-



Home | Main Index | Thread Index | Old Index