Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4963458pxb; Mon, 15 Feb 2021 06:09:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKc//DQlMOxcZs6cTq5PT839s3rz7DA0cgwb9bGCOOvjiNX5vLJli8QhBZ5NvybasmXApl X-Received: by 2002:a17:906:4058:: with SMTP id y24mr12950200ejj.6.1613398198161; Mon, 15 Feb 2021 06:09:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613398198; cv=none; d=google.com; s=arc-20160816; b=PQ2dIms8chW5AOYAwzq/jaALM2G3vZ+4aa5YECPWAJv3J8/c7F1aDKALLebO61QV2s vYb0MVX1k+9QxDL1Mca9it39wzbA7+ICIC2NDRQ1xiQd+pOzjGiHYc+trr4ONWRQeEql o7uUMqzAX/dt0in0n4NQpw4aMmucJNa+EgQ+WyQT5tAkdTnDN7cpp0AkyT8Laq9XOgD6 7UWjmSkpm04Ed/lkq70zEYaF5jUHjNnfFmCQWn1rUuDp8BcB5E0tp5SEZyQhmkgDA3pM WkvRymVcKB3waKVgrAEU9IGLgjWxsZAOEui1NohCPTY6usM5nJysx+TV8YTiXYQr0rnm RhaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=15j4m3VquBZp4WXGPpvSmKiKj5DlEoWO6CSMXAdKrYA=; b=Bhr+aAatufjBrPaLV8heTF4gygXhEM6eEWIKWC3VkEBKkYeG4b37kTsBYhQqszwPw+ 7LmSiDU89FubbyQSeG05FezcQ6dhNgG84+3j0t8SInG53OiCtmEpG2ewzdqmH1tTSvNG LxkHeTJcASQy6pOLJzLJSD4+rN6Js3IWcH7+QRulNRCivhgb9IdYC5TbVJT3Ot2zJcKo IwKtFn0wExbpmJvXMBuH/5rYdj2CMAh2tn9k0MQDAmfzgRqm/GyWi3NULPGZm1+x0Qlw Kd+iAI/f9CzyJphjDYied1/g2j7rcX19vvaZzV18n+wB1L8k2M7HwHVbYpWvkVZvXLWY QJjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si12841620ede.504.2021.02.15.06.09.33; Mon, 15 Feb 2021 06:09:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbhBOOIe (ORCPT + 99 others); Mon, 15 Feb 2021 09:08:34 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:42564 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbhBOOId (ORCPT ); Mon, 15 Feb 2021 09:08:33 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lBeXR-006RWz-Jq; Mon, 15 Feb 2021 15:07:45 +0100 Date: Mon, 15 Feb 2021 15:07:45 +0100 From: Andrew Lunn To: Kishon Vijay Abraham I Cc: Steen Hegelund , Vinod Koul , Alexandre Belloni , Lars Povlsen , Bjarni Jonasson , Microchip UNG Driver List , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 2/4] phy: Add media type and speed serdes configuration interfaces Message-ID: References: <20210210085255.2006824-1-steen.hegelund@microchip.com> <20210210085255.2006824-3-steen.hegelund@microchip.com> <04d91f6b-775a-8389-b813-31f7b4a778cb@ti.com> <704b850f-9345-2e36-e84b-b332fed22270@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <704b850f-9345-2e36-e84b-b332fed22270@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 05:25:10PM +0530, Kishon Vijay Abraham I wrote: > Okay. Is it going to be some sort of manual negotiation where the > Ethernet controller invokes set_speed with different speeds? Or the > Ethernet controller will get the speed using some out of band mechanism > and invokes set_speed once with the actual speed? Hi Kishon There are a few different mechanism possible. The SFP has an EEPROM which contains lots of parameters. One is the maximum baud rate the module supports. PHYLINK will combine this information with the MAC capabilities to determine the default speed. The users can select the mode the MAC works in, e.g. 1000BaseX vs 2500BaseX, via ethtool -s. Different modes needs different speeds. Some copper PHYs will change there host side interface baud rate when the media side interface changes mode. 10GBASE-X for 10G copper, 5GBase-X for 5G COPPER, 2500Base-X for 2.5G copper, and SGMII for old school 10/100/1G Ethernet. Mainline Linux has no support for it, but some 'vendor crap' will do a manual negotiation, simply trying different speeds and see if the SERDES establishes link. There is nothing standardised for this, as far as i know. Andrew