Re: Assistance with endian-ness

David Hollis <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 2007-01-31 at 19:18 +0800, Dave Liu wrote:
> > In asix.c, there are three register read/write functions:
> asix_read_cmd,
> > asix_write_cmd, and asix_write_cmd_async.  With a recent patch,
> > asix_write_cmd_async() was tweaked to wrap the params to the wValue,
> > wIndex and wLength for the URB in cpu_to_le16().
> asix_read/write_cmd()
> > were not modified in this way.  That seems to me to be an
> inconsistency
> > that could be contributing to our issues.
> 
> David, I noticed that the code have cpu_to_le16() in the
> usb_control_msg
> function. so I think the asix_read/write_cmd() don't need convert byte
> order. 

Ah, you are correct.  I seem to remember I looked into this at one point
and that must be what I came up with.  usb_fill_control_urb just takes
the URB data and adds it to direct to the URB, so any endianness needs
to be handled prior to calling it.

-- 
David Hollis <[email protected]>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.