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 0B74FC77B70 for ; Tue, 11 Apr 2023 13:27:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjDKN1C (ORCPT ); Tue, 11 Apr 2023 09:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjDKN1B (ORCPT ); Tue, 11 Apr 2023 09:27:01 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 791DB49DC for ; Tue, 11 Apr 2023 06:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6S2NHl0BvfAqpSaFGFaK37SJl+MkwL7+Z0/B+3QKwcI=; b=cqExamOdYyp/gEiDFSv8HjT5E4 LED8QXoW1KQpC43Epi9E7oz1BUV5D6+YEqvSUYDhbxnkR6cnl43nAihhJLXuTfa/MVbPeJqI+LMON TxUFXjDYeb4Qjt0vAa9GYqJLJH4ceYjYjAbHHHeyvu9YUgAiHqnKz3wu2BjG5OL8DFrcP+KsrF+xy MsUHDUO4FjR7B2sJ/+LV45FgTyG4my8Q28LY9cJw3sKp77sldFNoq3g0TiXBfSpIFc9Nguug9mPvi Wi7YiwCLWf5lG9n4FJfVt3arNvi1agH706UG0BoL1Aq5cfx9MbEUFgRl0e7duEdwYjFp+2VhUQRt9 424F28mA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55720) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmE1P-0005ws-AM; Tue, 11 Apr 2023 14:26:55 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pmE1N-000495-A9; Tue, 11 Apr 2023 14:26:53 +0100 Date: Tue, 11 Apr 2023 14:26:53 +0100 From: "Russell King (Oracle)" To: Vladimir Oltean Cc: Oleksij Rempel , Andrew Lunn , Woojung Huh , Arun Ramadoss , Florian Fainelli , netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Eric Dumazet , kernel@pengutronix.de, Jakub Kicinski , Paolo Abeni , "David S. Miller" Subject: Re: FWD: Re: [PATCH net-next v1 1/1] net: dsa: microchip: ksz8: Make flow control, speed, and duplex on CPU port configurable Message-ID: References: <7055f8c2-3dba-49cd-b639-b4b507bc1249@lunn.ch> <20230411085626.GA19711@pengutronix.de> <20230411111609.jhfcvvxbxbkl47ju@skbuf> <20230411131215.gt3lxq7ldaox3cfd@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230411131215.gt3lxq7ldaox3cfd@skbuf> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Apr 11, 2023 at 04:12:15PM +0300, Vladimir Oltean wrote: > On Tue, Apr 11, 2023 at 12:50:28PM +0100, Russell King (Oracle) wrote: > > On Tue, Apr 11, 2023 at 02:16:09PM +0300, Vladimir Oltean wrote: > > > On Tue, Apr 11, 2023 at 10:17:47AM +0100, Russell King (Oracle) wrote: > > > > Since we can't manually control the tx and rx pause enables, I think > > > > the only sensible way forward with this would be to either globally > > > > disable pause on the device, and not report support for any pause > > > > modes, > > > > > > This implies restarting autoneg on all the other switch ports when one > > > port's flow control mode is changed? > > > > From my reading of these global register descriptions, no it doesn't, > > and even if we did restart aneg, it would have no overall system effect > > because the advertisements for each port haven't been changed. It's > > mad hardware. > > > > What I was meaning above is that we configure the entire switch to > > either do autonegotiated flow control at setup time, or we configure > > the switch to never do flow control. > > I was thinking you were suggesting to also modify the advertisement in > software from those other ports to 00 when the flow control was forced > off on one. Otherwise (it seems you weren't), I think it's a bit > counter-productive to configure the switch to never do flow control, > when the only problem seems to be with the forced modes but autoneg is fine. As I see it, there's essentially two possible options with this hardware: 1. treat the switch as something that can negotiate pause modes. 2. treat the switch as something that doesn't support pause modes. You are absolutely right that if (1) then its possible through the advertisement to have (2) but the reverse is not true, so clearly (1) is the better approach here. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!