From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: DSA support for Marvell 88e6065 switch Date: Thu, 22 Nov 2018 14:21:23 +0100 Message-ID: <20181122132123.GA13466@amd> References: <20181115195111.GA9946@amd> <20181115202618.GF32274@lunn.ch> <20181118180712.GA16507@amd> <20181118182053.GE7446@lunn.ch> <20181118201528.GA18518@amd> <20181119032535.GA15561@lunn.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, buytenh@marvell.com, buytenh@wantstofly.org, nico@marvell.com To: Andrew Lunn Return-path: Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:43254 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436784AbeKWAAo (ORCPT ); Thu, 22 Nov 2018 19:00:44 -0500 Content-Disposition: inline In-Reply-To: <20181119032535.GA15561@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2018-11-19 04:25:35, Andrew Lunn wrote: > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > should just attach it as soon as it is compiled in? >=20 > Nope. It is a switch, not a PHY. Switches are never auto-probed > because they are not guaranteed to have ID registers. >=20 > You need to use the legacy device tree binding. Look in > Documentation/devicetree/bindings/net/dsa/dsa.txt, section Deprecated > Binding. You can get more examples if you checkout old kernels. Or > kirkwood-rd88f6281.dtsi, the dsa { } node which is disabled. Thanks; I ported code from mv88e66xx in the meantime, and switch appears to be detected. But I'm running into problems with tagging code, and I guess I'd like some help understanding. tag_trailer: allocates new skb, then copies data around. tag_qca: does dev->stats.tx_packets++, and reuses existing skb. tag_brcm: reuses existing skb. Is qca wrong in adjusting the statistics? Why does trailer allocate new skb? 6065 seems to use 2-byte header between "SFD" and "Destination address" in the ethernet frame. That's ... strange place to put header, as addresses are now shifted. I need to put ethernet in promisc mode (by running tcpdump) to get data moving.. and can not figure out what to do in tag_... Can I model it after tag_qca.c (simplified, because addresses will not need to be memmoved) or is there some special consideration I am missing? Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlv2rVMACgkQMOfwapXb+vLOpwCgk7ec9wXy6xjyjoO4WLzEUITb rhUAn1hJPqrtDURip28KiCjMCysrP6TV =MUmt -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--