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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 096DFC77B7A for ; Sat, 20 May 2023 05:03:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjETFD3 (ORCPT ); Sat, 20 May 2023 01:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjETFD0 (ORCPT ); Sat, 20 May 2023 01:03:26 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40764E4C for ; Fri, 19 May 2023 22:03:23 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0EkQ-0007Al-Jq; Sat, 20 May 2023 07:03:18 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1q0EkP-0005ZM-2c; Sat, 20 May 2023 07:03:17 +0200 Date: Sat, 20 May 2023 07:03:17 +0200 From: Oleksij Rempel To: Vladimir Oltean Cc: Woojung Huh , Andrew Lunn , Arun Ramadoss , Florian Fainelli , Simon Horman , "Russell King (Oracle)" , linux-kernel@vger.kernel.org, Eric Dumazet , Paolo Abeni , kernel@pengutronix.de, netdev@vger.kernel.org, Jakub Kicinski , UNGLinuxDriver@microchip.com, "David S. Miller" Subject: Re: [PATCH net-next v4 1/2] net: dsa: microchip: ksz8: Make flow control, speed, and duplex on CPU port configurable Message-ID: <20230520050317.GC18246@pengutronix.de> References: <20230519124700.635041-1-o.rempel@pengutronix.de> <20230519124700.635041-2-o.rempel@pengutronix.de> <20230519143004.luvz73jiyvnqxk4y@skbuf> <20230519185015.GA18246@pengutronix.de> <20230519203449.pc5vbfgbfc6rdo6i@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230519203449.pc5vbfgbfc6rdo6i@skbuf> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 19, 2023 at 11:34:49PM +0300, Vladimir Oltean wrote: > On Fri, May 19, 2023 at 08:50:15PM +0200, Oleksij Rempel wrote: > > Thank you for your feedback. I see your point. > > > > We need to remember that the KSZ switch series has different types of > > ports. Specifically, for the KSZ8 series, there's a unique port. This > > port is unique because it's the only one that can be configured with > > global registers, and it is only one supports tail tagging. This special > > port is already referenced in the driver by "dev->cpu_port", so I continued > > using it in my patch. > > Ok, I understand, so for the KSZ8 family, the assumption about which > port will use tail tagging is baked into the hardware. > > > It is important to note that while this port has an xMII interface, it > > is not the only port that could have an xMII interface. Therefore, using > > "dev->info->internal_phy" may not be the best way to identify this port, > > because there can be ports that are not global/cpu, have an xMII > > interface, but don't have an internal PHY. > > Right, but since we're talking about phylink, the goal is to identify > the xMII ports, not the CPU ports... This is a particularly denatured > case because the xMII port is global and is also the CPU port. I see. Do you have any suggestions for a better or more suitable implementation? I'm open to ideas. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |