Received: by 10.192.165.148 with SMTP id m20csp1387534imm; Sat, 5 May 2018 10:49:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoHH507z8D3nzCEXt5EMXbV5cx99Z14fE7tTZs2vcZ4qa0ewWFxYwp6cZmQL5pbvoM9x6pU X-Received: by 10.98.58.28 with SMTP id h28mr31243646pfa.209.1525542563297; Sat, 05 May 2018 10:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525542563; cv=none; d=google.com; s=arc-20160816; b=NSy6sziuAUlGNngIjx8Muh+3ERNNRrRSyKUslCcKWH95zdCxFtveF1iO1Th/gI/5pq CAN72na+g/VMqxt1Qj3UH8s08qtuABKWLxI2qVYtHS9bN8Yza99eySEkbHJS8wecZM8j ZNJDtIyUR3bdKaGD4HEEpdPefH9y1r/HLQyVDpxfCe7hZRcFza5WNAA/KFGigUOVGXSN 8AmtEHO4rcKT277gZSaFgSWB4cmFN0gT0LFiqyve+sMsFrcwnrt6J7CyC8798CCFQpAK 4h7/YGoV34TrsXsiVrXFN5p9njPwWmZNNniRt1spSZQ50052sbp2gLZd4H1z6/3+FFDM 2o7A== 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=+uE4XUzA+3mqPVm6b91uS0oH9cRg3k2fuG8rG3u+oOo=; b=0qi3D80JO6GJktmwxtH5hkq5lxHeoLLSUfQiPKOj9RzfoOgfl6oStKTPdqt0kv/mt4 ex7uwgt0pDh39Fc4HPcwovoyzoqf0IIEVcCa6e/puSqPcAi0e+mGXbqL5nm7dH+H53G5 S0Y/8D0K3v291qN35f1fRB8WTv1fRHfRFzxfvTtW/J9QnMGDHK1KKEkZ/LkQ+LCuLzER U442KIWMlBT6weNXtSiyKEtp9bnrbXu6URN5DFBM5uwcdexWueSEfgSzO5wh2tI1NSWR OtA2WvOrjmbcFkwKAcUIIWim7+UIDnkm7e85ruziPwKyFVa+D1THri4vmU6Zla0yPfg0 IXJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3XWfjJaI; 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 33-v6si19024157plf.308.2018.05.05.10.49.08; Sat, 05 May 2018 10:49:23 -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=pass header.i=@lunn.ch header.s=20171124 header.b=3XWfjJaI; 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 S1751775AbeEERsy (ORCPT + 99 others); Sat, 5 May 2018 13:48:54 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50246 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbeEERsw (ORCPT ); Sat, 5 May 2018 13:48:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=+uE4XUzA+3mqPVm6b91uS0oH9cRg3k2fuG8rG3u+oOo=; b=3XWfjJaIsWkeWfach8mECA0VOPUF28XF8ro2HkJ5m5VY+GufF0A73C65TZznHW3sOb5G5jxYK/QIi4ASDCeVdWbEw8gXVYA10FrH5tuc4ZVFNueOIFsFKAYtt6L2Vejwxss3A8VdyMLpMfmZlfcBPAsLwTLHgYGdnswUU6AZ/PA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fF1IV-0008JH-NI; Sat, 05 May 2018 19:48:39 +0200 Date: Sat, 5 May 2018 19:48:39 +0200 From: Andrew Lunn To: Thomas Petazzoni Cc: Antoine Tenart , Florian Fainelli , davem@davemloft.net, kishon@ti.com, linux@armlinux.org.uk, gregory.clement@bootlin.com, jason@lakedaemon.net, sebastian.hesselbarth@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 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 v2 02/13] net: phy: sfp: handle non-wired SFP connectors Message-ID: <20180505174839.GB30439@lunn.ch> References: <20180504135643.23466-1-antoine.tenart@bootlin.com> <20180504135643.23466-3-antoine.tenart@bootlin.com> <20180504172337.GC13899@kwain> <20180505173945.0754d0df@windsurf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180505173945.0754d0df@windsurf> 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 Sat, May 05, 2018 at 05:39:45PM +0200, Thomas Petazzoni wrote: > Hello, > > On Fri, 4 May 2018 19:23:37 +0200, Antoine Tenart wrote: > > > On Fri, May 04, 2018 at 10:04:48AM -0700, Florian Fainelli wrote: > > > On 05/04/2018 06:56 AM, Antoine Tenart wrote: > > > > SFP connectors can be solder on a board without having any of their pins > > > > (LOS, i2c...) wired. In such cases the SFP link state cannot be guessed, > > > > and the overall link status reporting is left to other layers. > > > > > > > > In order to achieve this, a new SFP_DEV status is added, named UNKNOWN. > > > > This mode is set when it is not possible for the SFP code to get the > > > > link status and as a result the link status is reported to be always UP > > > > from the SFP point of view. > > > > > > Why represent the SFP in Device Tree then? Why not just declare this is > > > a fixed link which would avoid having to introduce this "unknown" state. > > > > The other solution would have been to represent this as a fixed-link. > > But such a representation would report the link as being up all the > > time, which is something we wanted to avoid as the GoP in PPv2 can > > report some link status. This is achieved using SFP+phylink+PPv2. > > > > And representing the SFP cage in the device tree, although it's a > > "dummy" one, helps describing the hardware. > > Just to add to this: the board physically has a SFP cage, and a cable > can be connected to it, or not. So it is absolutely not a fixed link > (cable can be connected or not) and it really is a SFP cage. Hi Thomas What i have heard on the rumour mill is that the hardware design is FUBAR. The i2c-mux and i2c-gpio expanders are using the same addresses. Or something like that. So the data plane from the MAC to the SFP works. But the control plane is broken. I don't really have a problem listing an SFP in device tree. As you say, it physically exists on the boards. But because of the FUBAR hardware, it cannot be controlled. phylink is all about the control plane, and there is no control plane for this hardware. So connecting this sfp to phylink seems very wrong. When we have no control plain, we use a fixed-link. Isn't this hardware a reference design? It is not a real product. If it is an RDK, i'm sure Marvell are telling people it is FUBAR, don't copy it. There will be a new RDK sometime which has the problems fixed. So how much effort should we put into supporting a broken RDK, which nobody will copy into a real product? To me, KISS is the right approach and document it in the device tree what the issue is. If a real product comes to market which is equally FUBAR, we can then consider how to get the best out of the hardware. We can extend phylink to support a fixed link PHY, but still ask the MAC about its link status. Andrew