lkml.org 
[lkml]   [2022]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt for big-endian systems
On Mon, Oct 10, 2022 at 08:53:01PM +0200, Andrew Lunn wrote:
> > /* Special struct emulating a Ethernet header */
> > struct qca_mgmt_ethhdr {
> > - u32 command; /* command bit 31:0 */
> > - u32 seq; /* seq 63:32 */
> > - u32 mdio_data; /* first 4byte mdio */
> > + __le32 command; /* command bit 31:0 */
> > + __le32 seq; /* seq 63:32 */
> > + __le32 mdio_data; /* first 4byte mdio */
> > __be16 hdr; /* qca hdr */
> > } __packed;
>
> It looks odd that hdr is BE while the rest are LE. Did you check this?
>
> Andrew

Yes we did many test to analyze this and I just checked with some
tcpdump that the hdr is BE everytime. If you want I can provide you some
tcpdump from 2 different systems.

Anyway it looks like this family switch treats the hdr in a standard way
with the network byte order and for anything else stick to LE.

Also as a side note the tagger worked correctly before the mgmt feature
on BE systems and also works correctly now... just any command is slow
as the mgmt system has to timeout and fallback to legacy mdio.

--
Ansuel

\
 
 \ /
  Last update: 2022-10-10 21:09    [W:1.001 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site