Received: by 10.192.165.148 with SMTP id m20csp4204710imm; Tue, 8 May 2018 04:54:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrCqEa4h2yQ5mt+dBkBdGDzuJJGnJmqEdzQzUfw0Y5Lrzse+7x8qIjGz1nyv54tQOKBXpxY X-Received: by 10.167.129.154 with SMTP id g26mr27306133pfi.210.1525780455851; Tue, 08 May 2018 04:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525780455; cv=none; d=google.com; s=arc-20160816; b=LlEGqlxiVxgBU5t9DaHnnYhAMPyuefJw3NFcC5O5dPVJUj36nVLKIGyampqpsSKPPi 6AW9cJuVNfJzOF28b/lBdVUhZYP4e1KlNckOct31gDl1tpzQY5fcEeIqwYA/N4IHUiiL 2w6RWWMztS4465zgUqxtEp3vjovL4WGnGnCYmoKQUVOWMIjkSXsX8VL/a9XpUaa1kkKo 7ZIDA7Ki9K2jPLK4gZiFT4zbE59V9e2gbDqIzlgeN8GjgfLRTZJPLdFSglYz45YzugJy WSRQ8WlJdMSi34ChZV2l5qBwxFa3sQkq8pkQ87rF3C024SRrZ1uZm0QGZuYHJR9eWzuh sozw== 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=ibVUgUsh9K5iOhX+Z2zG4mXaJwAtM1N5ER9hC5BPfSQ=; b=khS7DvjLbjtXnx4ERBAlYSCK3pb/Yp/nrDH2g2hPeXbTbvk9pTznUpUStzEpd+/8Xc hsG2BbgiP3IyD4wF20yktEmdYq885qlwUCvY8uWBV5Bwme4M4ORVFkPEs6Qa+4k/y51o pd7BUd0EyGtL5Yv45kOLLI+XW/b/C66Obgdgmzhi/ynu26G/LG60APYfB/uTKx0xFgT5 oucafDq6vxQ+WWGBOibOPz/7wVXJ56bBA3Z/ptrDdj5VsYrfN1IH2VCAGBFhsnb1JnnB T6lb3SySJO93xcnk5HKD7X/U7ye923tkOSiJnWnCighhxO9xvOhIpDfR6riPz8nOvr12 hnEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=COx8yAkK; 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 e1-v6si23602036pld.69.2018.05.08.04.54.01; Tue, 08 May 2018 04:54:15 -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=COx8yAkK; 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 S1754798AbeEHLxv (ORCPT + 99 others); Tue, 8 May 2018 07:53:51 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:51736 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754183AbeEHLxt (ORCPT ); Tue, 8 May 2018 07:53:49 -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=ibVUgUsh9K5iOhX+Z2zG4mXaJwAtM1N5ER9hC5BPfSQ=; b=COx8yAkKjTT4qP8/wCgV+O2Ks 5O9bEtU9/TU/Y5T9HSBWVym5Oj+dVcy7EebeOFQd3Rm2KHaPP6Y9hSZNUi0A1KglHAwTpqJuF2Pcp Vo7ILvAIjYQt5PNu7ik/EyIwYC3wRz7WMdSrYjzI0hdhn7tnjpImDvp4OKRpBgz5hhtDA=; Received: from n2100.armlinux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:60812) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fG1Bb-0006dm-RO; Tue, 08 May 2018 12:53:40 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1fG1BY-0006sE-G0; Tue, 08 May 2018 12:53:36 +0100 Date: Tue, 8 May 2018 12:53:32 +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 03/13] net: phy: sfp: warn the user when no tx_disable pin is available Message-ID: <20180508115332.GG16141@n2100.armlinux.org.uk> References: <20180504135643.23466-1-antoine.tenart@bootlin.com> <20180504135643.23466-4-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504135643.23466-4-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:33PM +0200, Antoine Tenart wrote: > In case no Tx disable pin is available the SFP modules will always be > emitting. This could be an issue when using modules using laser as their > light source as we would have no way to disable it when the fiber is > removed. This patch adds a warning when registering an SFP cage which do > not have its tx_disable pin wired or available. > > Signed-off-by: Antoine Tenart Looks fine, thanks. Acked-by: Russell King > --- > drivers/net/phy/sfp.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c > index 8e323a4b70da..d4f503b2e3e2 100644 > --- a/drivers/net/phy/sfp.c > +++ b/drivers/net/phy/sfp.c > @@ -1093,6 +1093,15 @@ static int sfp_probe(struct platform_device *pdev) > if (!sfp->gpio[GPIO_MODDEF0] && !sfp->gpio[GPIO_LOS]) > sfp->sm_dev_state = SFP_DEV_UNKNOWN; > > + /* We could have an issue in cases no Tx disable pin is available or > + * wired as modules using a laser as their light source will continue to > + * be active when the fiber is removed. This could be a safety issue and > + * we should at least warn the user about that. > + */ > + if (!sfp->gpio[GPIO_TX_DISABLE]) > + dev_warn(sfp->dev, > + "No tx_disable pin: SFP modules will always be emitting.\n"); > + > return 0; > } > > -- > 2.17.0 > -- 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