Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2016 18:22:23 +0900
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Pyun YongHyeon <yongari@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r304439 - head/sys/dev/usb/net
Message-ID:  <20160819092223.GG1186@michelle.fasterthan.co.kr>
In-Reply-To: <2e8143d4-eb32-693d-e5a4-49c380c100df@selasky.org>
References:  <201608190050.u7J0oWkW043171@repo.freebsd.org> <464a63e6-e96c-a2d5-099d-ae9059fa0877@selasky.org> <20160819085511.GF1186@michelle.fasterthan.co.kr> <2e8143d4-eb32-693d-e5a4-49c380c100df@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160819092223.GG1186>