Received: by 10.213.65.68 with SMTP id h4csp1448554imn; Mon, 19 Mar 2018 04:36:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELv7PtTri+3m/CZW8nIKoKGaulYWmtgHXFA98kNjFrgPOURcOH+diadrRgPWjGlvQ+lyNc98 X-Received: by 10.101.88.76 with SMTP id s12mr8918552pgr.423.1521459371861; Mon, 19 Mar 2018 04:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521459371; cv=none; d=google.com; s=arc-20160816; b=qWfFaNVW2OnUwfpwcc8/SLhRq3A1dI4LFacWPaRda6nkTbIkRiWiXxTJe0WOf5fQpg ADr+D/EVi4DldM1RJGj805BZh5b1vlGYoMnoG5JA2y5dq6m6KvZI8Rziik+tO24ITBco oEqdivjM/5aS3A53rZG4PgYw6kQQzwimT/pgsFY9owtTskfz9TBDV60YW7zdDRSRrebe XjUIieNJTM+CY6pyXFYroqQY2NkrkuT8iR/3hXlAq2OH0yOSJ8WoxLR8wISbeiVHbgHe AUcLiOeZC5GclZftNdeiFMMdfhV5ODR/E5E/9siM2nyxXyumGVilwS4rg3GBKxkQ8ycJ hf6g== 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:arc-authentication-results; bh=bGJNdjrPr4LZT2vcoVuzmJClkJk4ip7dxpzM5V1wI4c=; b=RLLswZUeow+kilykq0DhppkXWmRlIoX7cPxCbGOCHaL6BsFHfIGO8xPQ7OGWckV0Ac IFeogcmAN6WzkpochVlMupvDaujFtcfoVaoyfgy5WpFhvKVBwI34j5oRXK3LyHPrXavq +O5fjQLqt8JMe3M3ejiV6c/+3JDTJvU7Uxmfcm2CwuIo3UF/YwkowpLzWsnv6foixgOE LZP8gIbYAbdOGSwcxykzz7r9vd4CYDQ7HDfFHDfEwLTvJVKK5NgKZGEagsgbm1XUCLI6 VeDMGbFfjlCBmvBTQyYwY021w7GcrNhgqF8hRSLl9G/cNPGe80A/yqDk7N9bOZyYZ6/c DEHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=h7cFyiP9; 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 n9si9430743pgd.778.2018.03.19.04.35.57; Mon, 19 Mar 2018 04:36:11 -0700 (PDT) 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 header.i=@armlinux.org.uk header.s=pandora-2014 header.b=h7cFyiP9; 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 S933227AbeCSLMb (ORCPT + 99 others); Mon, 19 Mar 2018 07:12:31 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:39156 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932487AbeCSLM3 (ORCPT ); Mon, 19 Mar 2018 07:12:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=bGJNdjrPr4LZT2vcoVuzmJClkJk4ip7dxpzM5V1wI4c=; b=h7cFyiP9F9gMq/Zuys70CBriymyQBdHLFdyY49PewbYb4W41UuVnuk6fMVUFzhqiUbsT6sRwbFdCEJtq+macIAIwB3ORrpAF4ySQNd+s1RILfYvLtb2HX0uiAx6sPx4ZBnK9VP33OI20tMEh5FoIuvn0E8qixOI+WBUhHXr3HmA=; Received: from n2100.armlinux.org.uk ([fd8f:7570:feb6:1:214:fdff:fe10:4f86]:40067) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1exsi4-0007og-8N; Mon, 19 Mar 2018 11:12:12 +0000 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1exshz-0005cc-Eb; Mon, 19 Mar 2018 11:12:07 +0000 Date: Mon, 19 Mar 2018 11:12:05 +0000 From: Russell King - ARM Linux To: Antoine Tenart Cc: davem@davemloft.net, kishon@ti.com, gregory.clement@bootlin.com, andrew@lunn.ch, jason@lakedaemon.net, sebastian.hesselbarth@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, maxime.chevallier@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next 02/10] net: phy: phylink: allow 10GKR interface to use in-band negotiation Message-ID: <20180319111205.GB2743@n2100.armlinux.org.uk> References: <20180316103351.16616-1-antoine.tenart@bootlin.com> <20180316103351.16616-3-antoine.tenart@bootlin.com> <20180316155307.GQ9418@n2100.armlinux.org.uk> <20180319085252.GF4519@kwain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180319085252.GF4519@kwain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 09:52:52AM +0100, Antoine Tenart wrote: > Hi Russell, > > On Fri, Mar 16, 2018 at 03:53:07PM +0000, Russell King - ARM Linux wrote: > > On Fri, Mar 16, 2018 at 11:33:43AM +0100, Antoine Tenart wrote: > > > The PHY mode 10GKR can use in-band negotiation. This patches allows this > > > mode to be used with MLO_AN_INBAND in phylink. > > > > > > Signed-off-by: Antoine Tenart > > > --- > > > drivers/net/phy/phylink.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c > > > index 51a011a349fe..7224b005f0dd 100644 > > > --- a/drivers/net/phy/phylink.c > > > +++ b/drivers/net/phy/phylink.c > > > @@ -768,7 +768,8 @@ int phylink_of_phy_connect(struct phylink *pl, struct device_node *dn, > > > /* Fixed links and 802.3z are handled without needing a PHY */ > > > if (pl->link_an_mode == MLO_AN_FIXED || > > > (pl->link_an_mode == MLO_AN_INBAND && > > > - phy_interface_mode_is_8023z(pl->link_interface))) > > > + (phy_interface_mode_is_8023z(pl->link_interface) || > > > + pl->link_interface == PHY_INTERFACE_MODE_10GKR))) > > > > There is no inband negotiation like there is with 802.3z or SGMII, > > so this makes no sense. > > Oh, that's what I feared. I read some docs but probably will need more > :) > > Anyway, the reason to use in-band negotiation was also to avoid using > fixed-link. It would work but always report the link is up, which for > the user isn't a great experience as we have a way to detect this. > > What would you suggest to achieve this in a reasonable way? The intention of this test in phylink_of_phy_connect() is to avoid failing when there is no requirement for a PHY to be present (such as a fixed link, or an 802.3z link.) However, with 10G PHYs such as the 3310, we need the PHY so we can read the speed from it, and so know whether to downgrade the MAC to SGMII mode, or having downgraded the MAC, upgrade it back to 10G mode when the PHY switches to 10G. I'm guessing that you're wanting this for the DB boards, but I don't see why. Do they not have PHYs? -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up