Received: by 10.213.65.68 with SMTP id h4csp1495028imn; Mon, 19 Mar 2018 05:54:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELvWLH9jxz6jDnSvv6OPGS9uMBLvi96S57tmZNVs/RB0XpJMmRA7GA5nwPRKo57fneSibQcV X-Received: by 10.98.87.29 with SMTP id l29mr6332177pfb.214.1521464062093; Mon, 19 Mar 2018 05:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521464062; cv=none; d=google.com; s=arc-20160816; b=XG22kDu1KyyySco8qxIHn5DWWlxkROurV6SomFQW9uZ8eMZbbWmOO+gwSO+RKKe82V nZQ3e6dzmZ+itcUXyzLzh6calO9rfuCzdP6dRKHugrw9JP+cbB4rub7bpa4IOZqwiAYx ma7C2QRbP/60egNuV+mEam4J5MDkzCJetzALAwQya4xzPtXI71wIY8yK0Y8UVdzRjvsb SWbILB1WOdBQ8C3OD9R3eFNaE4x/uycnxgZrwjbnzkLdlz7icLZP5UsIkdGtm0O4eEec AZ66Qhrlli8zYuxEneIeghc7BY87AvpEd93gIxyVIottu0Z8AwNHCa/ceg+v5kjWcg+p LBIw== 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=q0fcO+l6Ro+sdVgYJNnHkkWm3fOy0HldFKtsBiCNPNE=; b=hlv3IF22EkEOtwetpb925MqmyeTW8dUwF2euor8uE/+1ZcQSih3Zgc8yh9ZjVSsRu3 9nTWiSwloMB6aiLOUhEZyVXJyQKXyKU6v5IIIap2ATHBG9nfoZmUgdFv4vIUNHiw6JGm mPS88U5MNF5qZgJUl66Nb9xwsZf3CEvcB/3VXggBL1Q4Q5f6dBLj9h6r4jbqXEcQVroJ ed9KcWeZdLNwsZ7Gm7btO/cuPJzPvUV4FoiU9z1a6KdjAnaQjas7nAP/gmOJdqz128iS j8qi6GT3Oo9isgS9AzPVSapDHSxRJAS/ZvJwipqCrTHWxhuBcLNFCjZBrS+WCsasVkVa jT/A== 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 z8-v6si12084631plh.379.2018.03.19.05.54.07; Mon, 19 Mar 2018 05:54:22 -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 S1755436AbeCSMwd (ORCPT + 99 others); Mon, 19 Mar 2018 08:52:33 -0400 Received: from mail.bootlin.com ([62.4.15.54]:57984 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754892AbeCSMw3 (ORCPT ); Mon, 19 Mar 2018 08:52:29 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 4D78D20713; Mon, 19 Mar 2018 13:52:27 +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 (nat.foo.tf [163.172.35.26]) by mail.bootlin.com (Postfix) with ESMTPSA id EA1732064B; Mon, 19 Mar 2018 13:52:26 +0100 (CET) Date: Mon, 19 Mar 2018 13:52:27 +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: <20180319125227.GI4519@kwain> References: <20180316103351.16616-1-antoine.tenart@bootlin.com> <20180316103351.16616-3-antoine.tenart@bootlin.com> <20180316155307.GQ9418@n2100.armlinux.org.uk> <20180319085252.GF4519@kwain> <20180319111205.GB2743@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: <20180319111205.GB2743@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 Mon, Mar 19, 2018 at 11:12:05AM +0000, Russell King - ARM Linux wrote: > On Mon, Mar 19, 2018 at 09:52:52AM +0100, Antoine Tenart wrote: > > > > 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? You guessed right, that's exactly my use case. The DB boards (7k and 8k) have 10G interfaces without PHYs. I could describe them as fixed-link (it works), but it would be better not to require a PHY in phylink_of_phy_connect() for such interfaces. That's why I used in-band AN, which is wrong, but we still probably need to add a check to allow such setups. I'm all ears for suggestions as I do not have the full picture of all the supported modes and their requirements. Thanks! Antoine -- Antoine T?nart, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com