svn commit: r304439 - head/sys/dev/usb/net

YongHyeon PYUN pyunyh at gmail.com
Fri Aug 19 09:22:31 UTC 2016


On Fri, Aug 19, 2016 at 11:11:56AM +0200, Hans Petter Selasky wrote:
> On 08/19/16 10:55, YongHyeon PYUN wrote:
> >I think the order is right but it was not tested on big-endian
> >systems.
> 
> Hi,
> 
> I'm pretty sure the ifdef is wrong, because you write the fields one at 
> a time, using htole32():
> 
>                         txhdr.mss = 0;
>                         txhdr.len = htole32(AXGE_TXBYTES(m->m_pkthdr.len));
> 
> Big endian machines don't re-order variables like this.
> 
> You should remove the #else part.

Wouldn't USB stack pass txhdr structure without any
modification? And controller want to see len (low 32bits address)
first and then mss (high 32bits address). On big endian systems I
guess this should be reversed in host memory layout.  This is so
confusing so I could be wrong.


More information about the svn-src-all mailing list