Received: by 10.192.165.148 with SMTP id m20csp4204074imm; Tue, 8 May 2018 04:53:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoyOe92uNOm7vUGzmtPsmKskDVBqu2OnBoZa2w9zr03TxsDPcy3cdH4OfZJjEeYt3KBlDtv X-Received: by 2002:a17:902:5a46:: with SMTP id f6-v6mr40973501plm.85.1525780417014; Tue, 08 May 2018 04:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525780416; cv=none; d=google.com; s=arc-20160816; b=R4CvjI6ZAd2tKkWyU2isf5g7aSCOrn16bhhJHJ+3PcTB4ZOavxQgvL2BTv/EUIyECP J3+5BKJF9squgMh95/l0UHaNNO2Oq06M1KvWq01ZGwfW8BRLLmLGc1fyo5k3B7G0RA1j p86pgbHk+VRx8fHxizFwutgiF/e7FFzZ4BxiZpOIUeLikpjW8Ov/GRhoeSdVdxVPZWlR UlzacNXF0Fj+jTSeUm5JeyNhWUmjxbBJ8lK410qfL0x1rnSpZJ1h+VzR+lCZkxZa18yp Nq+53MAgRLSelb0fNbnJWGEgvyPSaRBtylx4m65wzAP1GwFCh5dBPioa/v1hIgQvQ0gU kWWw== 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=Xikd+cjjEzAElvDWjWH3WK+/SFdkIMCKgKOoIa3lFEw=; b=rCqHvY9iRiNCiHb5twNHUHKpLr63AVOwSzRWUlgaMQpwoXt2dHtBJvl0lRhr8K+Jqo U2vw2K9VAou9hnqY8Bthm3R8DCQx7kcCaxDRj/KjM+04OqSnmyc/Gunj7SxyhknK3sEj gwp0hEdgamHvunhhCt1EYekaUSE5GllSUCLSUqPp/pOHq4CPK75XQn0PFe+Q7ecwDGQd 2syBiNWV1GOc8YVVw0EGClWDN/cxFhQMgbbVlJJZ4K4N6dIfpwyuiF8qLahPxqd6Dkoi 4ViSYqK3ZHPusSISsa/dNoV9ybDttgrGpThTtOJf6P3hm0d28AnkDfXRzYBrND782g4d 2DAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=gSj/eJe8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si14524723pfm.110.2018.05.08.04.53.22; Tue, 08 May 2018 04:53:36 -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=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=gSj/eJe8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784AbeEHLxN (ORCPT + 99 others); Tue, 8 May 2018 07:53:13 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:51696 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754341AbeEHLxL (ORCPT ); Tue, 8 May 2018 07:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Xikd+cjjEzAElvDWjWH3WK+/SFdkIMCKgKOoIa3lFEw=; b=gSj/eJe8Qdz0Zx3ARoaHWGp8R c/vdrnb7QOvGncPV9ZcbmV+09o7f//6krMGnE6auJBUqj4nM72QsqDuaM4WKicA2oM34tP6b3xUtu GukWw+zOFKtV+qzrbuAF7y3k3xn9ylqVp4fjxwIuQ1ldBg3oMv0fnO9Lf3Et/y4p3IYFw=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:45451) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fG1Ap-0006d3-Au; Tue, 08 May 2018 12:52:51 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1fG1Am-0006rB-Jl; Tue, 08 May 2018 12:52:48 +0100 Date: Tue, 8 May 2018 12:52:47 +0100 From: Russell King - ARM Linux To: Antoine Tenart Cc: 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 v2 02/13] net: phy: sfp: handle non-wired SFP connectors Message-ID: <20180508115247.GF16141@n2100.armlinux.org.uk> References: <20180504135643.23466-1-antoine.tenart@bootlin.com> <20180504135643.23466-3-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504135643.23466-3-antoine.tenart@bootlin.com> 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 Fri, May 04, 2018 at 03:56:32PM +0200, 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. This looks weird to me. SFP_DEV_* states track the netdevice up/down state and have little to do with whether LOS or MODDEF0 are implemented. I think it would be better to have a new SFP_MOD_* and to force sm_mod_state to that in this circumstance. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up