From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7803BC432C0 for ; Thu, 21 Nov 2019 23:17:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2009120637 for ; Thu, 21 Nov 2019 23:17:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="B38ieT2c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbfKUXRX (ORCPT ); Thu, 21 Nov 2019 18:17:23 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:35358 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfKUXRX (ORCPT ); Thu, 21 Nov 2019 18:17:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; 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=scYVySA669iXbTbYQkTD4Y7qlhrrjf7mXSiRr7aJgCk=; b=B38ieT2c3YL7KfHKWgQnw3BpB 1SKzStgu4d//DuH3aVliVlMeMzNg5edPr3f1Qf2uFz+abvIAFmggxFHjtSLjd01pjuCFLuV5PqBGF E7g6RXDJt3wlniUWjnqGenBn6msMk99qdCEaJyf2lTAqDURozYdFLoVXfgaVax5CNij2RRSS6YV8r Wa/8Chq/qfj3Pushf7jYDGEGLhzGAtZogpfMWMWE9j5+Vlb1wwQpNBFYZkV9x9CLxmim+cRi7/31s HVhlivsf/yggzVM6L24IrmZmglCsCVn+YjABOk/QYSXb3SL+WxagrgE7w7vc++d+QObBTI2OjF1k8 HmsYyTOTg==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:59412) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iXvhJ-0001IG-L4; Thu, 21 Nov 2019 23:17:13 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iXvhF-00038U-A5; Thu, 21 Nov 2019 23:17:09 +0000 Date: Thu, 21 Nov 2019 23:17:09 +0000 From: Russell King - ARM Linux admin To: Ioana Ciornei Cc: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next v2] net: sfp: soft status and control support Message-ID: <20191121231709.GB25745@shell.armlinux.org.uk> References: <20191121162309.GZ25745@shell.armlinux.org.uk> <20191121185457.GA25745@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Nov 21, 2019 at 07:14:01PM +0000, Ioana Ciornei wrote: > > Subject: Re: [PATCH net-next v2] net: sfp: soft status and control support > > > > On Thu, Nov 21, 2019 at 06:33:41PM +0000, Ioana Ciornei wrote: > > > > > > > Subject: Re: [PATCH net-next v2] net: sfp: soft status and control > > > > support > > > > > > > > On Thu, Nov 21, 2019 at 03:51:07PM +0000, Ioana Ciornei wrote: > > > > > > Subject: [PATCH net-next v2] net: sfp: soft status and control > > > > > > support > > > > > > > > > > > > Add support for the soft status and control register, which > > > > > > allows TX_FAULT and RX_LOS to be monitored and TX_DISABLE to be > > > > > > set. We make use of this when the board does not support GPIOs > > > > > > for these > > > > signals. > > > > > > > > > > Hi Russell, > > > > > > > > > > With this addition, shouldn't the following print be removed? > > > > > > > > > > [ 2.967583] sfp sfp-mac4: No tx_disable pin: SFP modules will always be > > > > emitting. > > > > > > > > No, because modules do not have to provide the soft controls. > > > > > > > > > > I understand that the soft controls are optional but can't we read > > > byte 93 (Enhanced Options) and see if bit 6 (Optional soft TX_DISABLE > > > control) is set or not (ie the soft TX_DISABLE is implemented)? > > > > At cage initialisation time, when we don't know whether there's a module > > present or not? > > > > I was not suggesting to keep the print exactly in place. > Anyway, it was merely a curiosity because it can be a misleading info in > some situations. However, it's the safe thing to do, to assume that the module soft TX disable may not be implemented or working. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up