Received: by 10.192.165.148 with SMTP id m20csp293394imm; Fri, 4 May 2018 10:24:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqIDvhgoxhFbqcgsF7OFNjoGPlRrCUPW/zpOcDGA46GoeKHBqZ2nhVF6+9pNJWkw9lmD9Jp X-Received: by 2002:a63:b746:: with SMTP id w6-v6mr18371091pgt.215.1525454643972; Fri, 04 May 2018 10:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525454643; cv=none; d=google.com; s=arc-20160816; b=icoQseq1/bE06wm4x1eKNOw/n7tIr0SlG2fOFBT6M5E5OXgrp7C0lj0Ur5T/F4+8c1 TmE31itWpGIcC1jLsILG1FRo6CtPnGv5hOyHpgIdPFCx35DZCMjDwfGrwAA4rHsakv+L VAnpPapfpV0qh+OTF6f2/2foIbQML4cbGylFqetLVHQkTcP6b6DKsMt3w78AwDagmZAi /clvaUS95iz4XVUq8MO0lt/Zt6QckVwEehkpW/fk9HluDhzVlooGzt94dROWELl95LKC p+4mxRevJExqCuwx1XiuQTjZZ5I1veJjQg3FsEMK8d4dV5fW75cShspj8P0S0wpUjOIV yIXg== 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=gVAIljkxjlSZiAS2jOrBtDUS9/qAs/wmmjBt7O1lWUs=; b=Jm8cuf9g3MQQfJRh8Ykp5SpEbzc7X7C/AWIwYCG/znJEyAWD+X5HfV7AuoLc9WoFyR gAsBN/UnfeYm+8Vta/FZYCIgx5Vtxbp0Rqeja+5jGgcwm4RSu/IYIBhCuoG0Uggu55Pu Xf9O5UoVHn3urw3gNCLwqUyIwsdTFMyK8N3r51nBA1aH5Sn3JOlaN/lvQcSSTtkSOWK1 rZGo3UtwrpNwtPqOtO9Mh9Pje4GtO97jDcsd7cW6kY8UFspb6DJeqTmNF/Uz82kwBvn/ 8YZyyGKJYsHIqfczfKHlzwzJ/tHB9Ya7Ykw2LWhHJ4ehiiEknd+34NHHT4gGnYfEeggW 4k5g== 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 f85si16678842pfj.125.2018.05.04.10.23.49; Fri, 04 May 2018 10:24:03 -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 S1751845AbeEDRXk (ORCPT + 99 others); Fri, 4 May 2018 13:23:40 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40563 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbeEDRXj (ORCPT ); Fri, 4 May 2018 13:23:39 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id EC7A720737; Fri, 4 May 2018 19:23:36 +0200 (CEST) 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 (LFbn-TOU-1-136-118.w86-201.abo.wanadoo.fr [86.201.22.118]) by mail.bootlin.com (Postfix) with ESMTPSA id BD8C52038E; Fri, 4 May 2018 19:23:36 +0200 (CEST) Date: Fri, 4 May 2018 19:23:37 +0200 From: Antoine Tenart To: Florian Fainelli Cc: Antoine Tenart , davem@davemloft.net, kishon@ti.com, linux@armlinux.org.uk, 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 v2 02/13] net: phy: sfp: handle non-wired SFP connectors Message-ID: <20180504172337.GC13899@kwain> References: <20180504135643.23466-1-antoine.tenart@bootlin.com> <20180504135643.23466-3-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Florian, 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. Thanks! Antoine -- Antoine T?nart, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com