Received: by 10.213.65.68 with SMTP id h4csp1363527imn; Mon, 19 Mar 2018 01:55:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELvuOcTgKYLQDM7FB76HClsTbgOH9kLVeuKVtC779Lzh331HhcHB+x4oG5I9JEqu5yh5+fVc X-Received: by 10.99.105.7 with SMTP id e7mr8475919pgc.193.1521449735316; Mon, 19 Mar 2018 01:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521449735; cv=none; d=google.com; s=arc-20160816; b=QrkgTLwIKTwEpMNYMryonhnEYjT0mStieo9OrU344Arv7uLMOsUAjLlfU7BuX8Y6/G GwbwoD5AjjsuRN3lY4c5Q3VxE/j12FBzz8FZUDpjcJKrZA2u4wi8CTWXWWxyhHbMZbXk F0N2iI7D2E8NWzw4RWkHFLfhU97xVXKPcjTrAI+YBICJVTR7ypROJ8pBqIq0cncjbHr0 216KtE3M1V8HnZZe7sUVWOnHZVAsmP8ZtZ/agqlTkn3sH6JXI1sotVDqejSfrowVjtJy 3aNyS8Nj0H8LoU6H6wmQoOdE/KNKAtVwHBzrbEljGE+xqyGo6VtzVJaHcvFtxnjAClmQ LHiQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=kBOXsLCjGk03TvA2g1Uvy7PTnjFnIxo59997SHozWlk=; b=CtQPQ0IHHeKcdYjEBZXa+s+4lie8eC/OqZtkd4bRI/KfJSQSlxT0o1alA6L+Hly9yd 90gP6KAO+979bmLAs0ATTr/uVck4cfZqsmtYlRuScJGBlp0AH5J56UwTjPb47t+JtdY9 8d0BnB7wSb8DoORo1mDs+aJ/8pun1QFAfJ/cr+NfXUBme1Gf/LPCkdBnnGsO6aoYJ+bH u/4JJ255cMXBotigm1DkiaaEzZscjRHCGi9ZV/pzCxP/Lzv0sNEiHaJkPlddq3Mfy2o/ Kl9HuTB/YcxY7McJOqtroQbmktbqeZsuXCkvPpVPMoti1fd8Mdz35AyMWqFWyuxpP7CE gaVA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si11794522plh.296.2018.03.19.01.55.21; Mon, 19 Mar 2018 01:55:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932808AbeCSIw5 (ORCPT + 99 others); Mon, 19 Mar 2018 04:52:57 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49742 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbeCSIwy (ORCPT ); Mon, 19 Mar 2018 04:52:54 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 69668207E5; Mon, 19 Mar 2018 09:52:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 177A62064B; Mon, 19 Mar 2018 09:52:52 +0100 (CET) Date: Mon, 19 Mar 2018 09:52:52 +0100 From: Antoine Tenart To: Russell King - ARM Linux Cc: Antoine Tenart , 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: <20180319085252.GF4519@kwain> References: <20180316103351.16616-1-antoine.tenart@bootlin.com> <20180316103351.16616-3-antoine.tenart@bootlin.com> <20180316155307.GQ9418@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180316155307.GQ9418@n2100.armlinux.org.uk> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, Antoine -- Antoine T?nart, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com