Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5314011ybl; Tue, 4 Feb 2020 11:35:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyO95cus0n9RPw/BsOnXi7cTT0YzIfRRus5HSkhvmYxYNDIvRdTLtEak94xHR+rnuTeLCjQ X-Received: by 2002:a9d:dc1:: with SMTP id 59mr23314246ots.250.1580844904993; Tue, 04 Feb 2020 11:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580844904; cv=none; d=google.com; s=arc-20160816; b=mV/1anWDY1gVCz72yBuR9cnEhKeA+tMpkqO9++mHsZDyfQciKepnDOMLvkRiHQahIX BqGtc/Q+FoTxMJS9Ehdyl8ROF4bA3LyLiPEV7ElZWGWkKi/F0/Ayb+iOr56Uq526/WFr oMo3Ypagr7E6yS/5NmIQB5Sw2UZTtj6sN8LNvZTwDRfibH5qiBzHTxqkZITsQZPqE7EN UzK9Dlt74+9nJXjQg2xFBaQG6FkSHhQ8BOAPcwTOgbjAxOGfhfDgUbPvfzZjXpJhMELo K8hNfh0cLXOUgEE/ZQNwkkdLUlqREagMqWSrAzRJ2lrmqPLL14nv3+IWfwnY3eaPFYTd PdCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NEyB+td276ts8YTAgKy+Wd6aG//Mg77+7niimGcvraE=; b=Nych9C/V4ZaQBJjuCT43N3C4UbvuOva59ZVBMf6S1jRixrbNARZ/R7hgcC/viL6EeJ x+JWVcx1osAjVz0KWMxQGMz7BNqV3sbQWK0hjKoAkgAHq6G2SxedDV8sep70uZAxNI1y yw2/qgZ5rrS08WIdETIW9dQHRYToIHbTTZswLUDJLBJf0Jwnr8PlMpybayCwDL8V3Q6w YZGdhAkHTiQEO12F3keGtslqoLGx4pbfRj6COyHVI/OjH3ByQTcgDuv1n8cl10nym5L2 tJ7NBaZ3uxB1pjUNReMOmdyiwUvGfrLhqocwoKuOeqcDnF+2j9ZTEJIwNKQ+wfwn3eGP muaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MS7LtFiH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si11112859oik.171.2020.02.04.11.34.52; Tue, 04 Feb 2020 11:35:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MS7LtFiH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727661AbgBDTcr (ORCPT + 99 others); Tue, 4 Feb 2020 14:32:47 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:54924 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727507AbgBDTcq (ORCPT ); Tue, 4 Feb 2020 14:32:46 -0500 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=NEyB+td276ts8YTAgKy+Wd6aG//Mg77+7niimGcvraE=; b=MS7LtFiH+GHOwbhBv+vWvw2G6 GGWaM353Shw+BRBXs3RPScYYjeHQWFMROBIpEnJT7HGRbSG1i8cbmhXaKODdxvHybU3ar6gtLPDjK v7CeOGLDXcMudmwpzsdOQT8Tg3F1uCEx98i+Uv6jo4DSh0TY7l0+Oq1AzLR124wiV8lWBE+CtiRzt H1JY2UDAKt+Sv2+BWrf3iA9Jkf/+VFwVJraFRdDYOAiVKA70VZuRUOCEckZxy2i9fRi38TAP0VZni Zxa04NpiTRK6Y50rqsQgLNI2xlxelTAhwhieQKXV7XbA7I79pi+7flkAWySufmzU+MTigSV/8khep JPfNySMhQ==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:35968) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iz3w3-00040d-Fm; Tue, 04 Feb 2020 19:32:35 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iz3vy-0001AI-Sy; Tue, 04 Feb 2020 19:32:30 +0000 Date: Tue, 4 Feb 2020 19:32:30 +0000 From: Russell King - ARM Linux admin To: Andrew Lunn Cc: Jose Abreu , Joao Pinto , Alexandre Torgue , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , Florian Fainelli , Maxime Coquelin , Jakub Kicinski , Giuseppe Cavallaro , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" , Heiner Kallweit Subject: Re: [RFC net-next 6/8] net: phylink: Configure MAC/PCS when link is up without PHY Message-ID: <20200204193230.GT25745@shell.armlinux.org.uk> References: <20200127114600.GU25745@shell.armlinux.org.uk> <20200127140038.GD13647@lunn.ch> <20200127140834.GW25745@shell.armlinux.org.uk> <20200127145107.GE13647@lunn.ch> <20200127161132.GX25745@shell.armlinux.org.uk> <20200127162206.GJ13647@lunn.ch> <20200204172603.GS25745@shell.armlinux.org.uk> <20200204174318.GB1364@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200204174318.GB1364@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 04, 2020 at 06:43:18PM +0100, Andrew Lunn wrote: > > There, there is one MAC, but there are multiple different PCS - one > > for SGMII and 1000base-X, another for 10G, another for 25G, etc. > > These PCS are accessed via a MDIO adapter embedded in each of the > > MAC hardware blocks. > > Hi Russell > > Marvell mv88e6390X switches are like this is a well. There is a PCS > for SGMII and 1000Base-X, and a second one for 10G. And it dynamically > swaps between them depending on the port mode, the so called cmode. > > So a generic solution is required, and please take your time to build > one. Well, DSA is quite a mixed bag... As far as I can work out, the situation with the CPU and DSA ports is quite hopeless - you've claimed that a change in phylink has broken it, I can't find what that may be. The fact is, phylink has never had any link information for DSA links when no fixed-link property has been specified in DT. As I've already said in a previous email about this, I can't see *any* sane way to fix that - but there was no response. On a more positive note... The mac_link_up() changes that I've talked about should work for DSA, if only there was a reasonable way to reconfigure the ports. If you look at the "phy" branch, you will notice that there's a patch there - "net: mv88e6xxx: use resolved link config in mac_link_up()" which adds the support to configure the MAC manually. It's rather messy, and I see no way to deal with the pause settings. There is support in some Marvell DSA switches to force flow control but that's not supported through the current mid-layer at all (port_set_pause doesn't do it.) I'm not sure whether the "mv88e6xxx_phy_is_internal()" check there is the right test for every DSA switch correct either. What is missing is reading the results from the PCS (aka serdes) and forwarding them into phylink - I did have a quick look at how that might be possible, but the DSA code structure (consisting of multiple mid-layers) makes it hard without rewriting quite a lot of code. That's fine if you know all the DSA chips inside out, but I don't - and that's where we need someone who has the knowledge of all DSA switches that we support. Or, we get rid of the multiple mid-layers and switch to a library approach, so that we can modify support for one DSA switch without affecting everything. It may be a simple matter of dropping the existing serdes workaround, but I'm not sure at the moment. I've tried this code out on the ZII rev B, I haven't tried it on the rev C which has the 6390 switches yet. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up