Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1188721rdb; Fri, 16 Feb 2024 07:51:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOc87zNa81h9dIgCX3xQM6U2DNqvZXDPKmaxArYBWTxcqz4qI3ANHWeaX1JKhL2HfxjVQzlnOOdTqK8tSOlvIMSFPBoBEEb6U0ByMQJg== X-Google-Smtp-Source: AGHT+IEbwIkjdQvJJZ7gVcOS1V5Xj7JF4hnDUeWf/HTtxnnTfg383Gts6gAIrWhup1OVSaAw4Z9U X-Received: by 2002:a17:903:2452:b0:1db:8cd7:495f with SMTP id l18-20020a170903245200b001db8cd7495fmr5304557pls.58.1708098716228; Fri, 16 Feb 2024 07:51:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708098716; cv=pass; d=google.com; s=arc-20160816; b=AK7HUDvsXtitLiD4FsLI8OT8uIuFWdHZoyu9UG8/E3sunkgDwJIdWvcj52Vg03cMxu AM6CieKnj/XpxL71YFfCASJctR+7uxNlMel8uqY2RYGZJARc7IbDPPQ7+YOXcsvAxj2J T8+G/kAeLV7QZoyxhbhWRIwcI2K1h+GAyggLsTf3ii8EbJpyKeolJ0oUgTp4uCSQHrhG eSKG6uHuLrPx+pM73+i75BsodHLb15B3Og/lCJByDZlBG0xnTtSXhIMtHyxnZAAH3qUR SqLhQ9gxSoKCqFRReqbW9fepv8Y8lxXOkE4xfSXjWiNijGmOVYroEFbTYooOUlXXW6g0 NqhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mW8V17MsmL7VEwiMKsJzk5HQ8Z5PWc1CNNBk+B48w+A=; fh=ZiOXkw3f/uhDHfv5tnbDTBIOxdGvmj1wAueCQoHDYpU=; b=jUhFKXfOH7GMZJWyXBFcNwK9Sak/qLJe6xwt4AtL/SMd8yEOnXLYtRfEDEpXyOPj2i olK8vnFMpzOXXgDat1nhyc6vfWH1vKEj2FK9Jkqp59rAuxCq7tLgGqwegg4JufE/atSR J6HUEw1gLPZDTajLOeLTgblmJxujzR5mgc5U2t4KnXnZuQwjlTqQORzrQ09fRAXb8h0c Qp+HOtvl9naYiFpUtAmIX4HMfoVe+So8mMIC2FTsWMSEkBXbKpoj/pCCPTP74pWvAppI mXWjG5Tv2CyNcNt/1Klr7HBTONayplqveaB8aVHZMn+aTHvB3mePfcBgfpcQ5wB16obS 6yWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=i8bUIEw0; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-68899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n123-20020a632781000000b005dcbba492aasi57937pgn.736.2024.02.16.07.51.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=i8bUIEw0; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-68899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 852DB2897D3 for ; Fri, 16 Feb 2024 15:44:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFDBF12F5AE; Fri, 16 Feb 2024 15:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="i8bUIEw0" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05EDC12BF03; Fri, 16 Feb 2024 15:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098243; cv=none; b=UEJFavedJKlCOV/KoVMxWhVei+UO0qJs0lbk67mxHfeLVFgHXmsZ6IcZI9kMXgLHEyPbZs2YtuRKTfm1Rj4P0vhC0XaKCQ+EzjkKbCoWrxBztp0fZJ4aoax5S3y6BNWZkI1toE1u3LYrGqASDkGVSCCgp++KiuhjzNoAKQb9ti8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098243; c=relaxed/simple; bh=F+QVlPQi+jHUwVgrFftfh61LcSMs2H+6H2+hUGJpckA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nii9mnHDBzZNZxojhiYLB5CnB5oBgNhnkcLv3B5jyBwepOkM5zh+QJmLRttS71b6AfOn5n/yigvRziP9mJi3SR8KIO0HnDot7+6NgwQBYgo5gYPWZJ19LCqkNyPfsVTk32Qyi6JkD2FRqpa1yHG70Amg9s6ACs0vxpk7vC/GyrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=i8bUIEw0; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To: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=mW8V17MsmL7VEwiMKsJzk5HQ8Z5PWc1CNNBk+B48w+A=; b=i8bUIEw0N70QsZY2kDWJw1w4Tm 6gzsJwmiUQN3C2NpHmyiXWkKt28KIwMPjgnx/9xrlHwCJES6JRmoQUaZD5nEIt36e+f5uo8g2HT+h H9kX4R3NSAGfSw30WE6TPGAnrQuOP6x4LSxQDqyzuQe/C0mnUkingYlhy9lGC5TMIaGaD2na7FwjS jjbeVQl9EJEasTrVJfdyFYsvW/WjFuOOD99gweBMdJUso+9N2a2jpUlnRvn9qyRUxdAgWkkNNnr6j B5GhiKYPFc28873AR+zyIPUs5iEmpUBKFzjpvnOEVolxujCmlSijC2qYYPmuU0ewkbcaE518+DQ5N r7G6PVoA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33656) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rb0NH-0005ns-1X; Fri, 16 Feb 2024 15:43:39 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rb0N8-0005jP-NS; Fri, 16 Feb 2024 15:43:30 +0000 Date: Fri, 16 Feb 2024 15:43:30 +0000 From: "Russell King (Oracle)" To: arinc.unal@arinc9.com Cc: Daniel Golle , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH netnext 8/8] net: dsa: mt7530: simplify link operations and force link down on all ports Message-ID: References: <20240208-for-netnext-mt7530-improvements-3-v1-0-d7c1cfd502ca@arinc9.com> <20240208-for-netnext-mt7530-improvements-3-v1-8-d7c1cfd502ca@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240208-for-netnext-mt7530-improvements-3-v1-8-d7c1cfd502ca@arinc9.com> Sender: Russell King (Oracle) On Thu, Feb 08, 2024 at 08:51:36AM +0300, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > Currently, the link operations for switch MACs are scattered across > port_enable, port_disable, phylink_mac_config, phylink_mac_link_up, and > phylink_mac_link_down. > > port_enable and port_disable clears the link settings. Move that to > mt7530_setup() and mt7531_setup_common() which set up the switches. This > way, the link settings are cleared on all ports at setup, and then only > once with phylink_mac_link_down() when a link goes down. > > Enable force mode at setup to apply the force part of the link settings. > This ensures that only active ports will have their link up. I think we may have a different interpretation of what phylink's mac_link_down() and mac_link_up() are supposed to be doing here. Of course, you have read the documentation of these methods so are fully aware of what they're supposed to do. So you are aware that when inband mode is being used, forcing the link down may be counter-productive depending on how the hardware works. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!