From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FD49C433F5 for ; Thu, 31 Mar 2022 10:31:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9CD11841F3; Thu, 31 Mar 2022 12:31:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="lxnWJaZ3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3448D841F3; Thu, 31 Mar 2022 12:31:04 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 61D2F83FBF for ; Thu, 31 Mar 2022 12:30:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPS id 0249F13FAA7; Thu, 31 Mar 2022 12:30:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1648722652; bh=6C0My8HLsHjPXn/OexKGR74PPcM3lujqXg3C86KN30A=; h=Date:From:To; b=lxnWJaZ3gXrhXrF9SImwWEsqhoWxTKdGYl2cG3Pxv0tAbssJYAke1s86QTJPlXLC+ Ek0OutiBR/GWBxZYT6z4phYE7zAC0wFnagWR9cQ925A+z7/lzoRUkvrXovCcDkEeVz FSYD5fr4UrRn7uj6fTKQv6mo0Eu6Q8MfskaWREEk= Date: Thu, 31 Mar 2022 12:30:51 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Tim Harvey Cc: Joe Hershberger , Ramon Fried , Vladimir Oltean , u-boot , Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" Subject: Re: [PATCH 5/6] net: add MV88E61xx DSA driver Message-ID: <20220331123051.5f961d40@thinkpad> In-Reply-To: References: <20220329225240.1416-1-tharvey@gateworks.com> <20220329225240.1416-6-tharvey@gateworks.com> <20220330012223.71ea3812@thinkpad> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Wed, 30 Mar 2022 08:46:06 -0700 Tim Harvey wrote: > On Tue, Mar 29, 2022 at 4:22 PM Marek Beh=C3=BAn wro= te: > > > > On Tue, 29 Mar 2022 15:52:39 -0700 > > Tim Harvey wrote: > > =20 > > > Add a DSA driver for the MV88E61xx compatible GbE Ethernet switches. > > > > > > Signed-off-by: Tim Harvey =20 > > =20 >=20 > Marek, >=20 > Thanks for looking at this. >=20 > > Is this final version that should be accepted? =20 >=20 > This is the first submission of the new driver. >=20 > > > > The drivers seems to support not only 61xx, but 6xxx (6096, 6250, 6352, > > ...). =20 >=20 > It should also support all the same devices that the non dsa driver it > was derived from (drivers/net/phy/mv88e61xx.c) but I only have a board > with 88E6176 to test with. >=20 > It is not completely clear to me what devices are supported in the > original driver per Kconfig but from looking over the code I would say > the following appear to be supported: > mv88e6096 > mv88e6097 > mv88e6020 > mv88e6070 > mv88e6071 > mv88e6172 > mv88e6176 > mv88e6220 > mv88e6240 > mv88e6250 > mv88e6352 >=20 > > > > Also there are some commented lines, for example > > =20 > > > +// u16 port_stat_link_mask;/* Bitmask for port link status bits */ > > > +// u16 port_stat_dup_mask; /* Bitmask for port duplex status bits = */ > > > +// u8 port_stat_speed_width;/* Width of speed status bitfield */ = =20 > > > > What is their purpose? > > =20 >=20 > oops... that was a mistake. I'm surprised checkpatch didn't catch > those. Those were in the non-dsa driver and not used here so will be > removed. >=20 > > Why is mv88e61xx_dsa_xmit() no-op? =20 >=20 > For DSA dsa-uclass calls the switch master eth device send function > after calling the dsa_ops->xmit function so that a dsa driver can add > any header/footer if needed. The function is required but in my case I > don't care about header/footer tagging or vlan as only 1 port is > active at a time in U-Boot so I just return success. So if I make one port active, the other are completely disabled? They won't even switch? Is that how DSA uclass is supposed to work in U-Boot? I would think that it should be somehow configurable instead. Marek