Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1133041pxb; Sat, 9 Jan 2021 08:31:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsrbbdxD6XHkqb2mA4DNjbLKdvsEiUjTFajtTZP2xCuQXxwahxWhRp7M/kL3b19qU31F6v X-Received: by 2002:aa7:d5d2:: with SMTP id d18mr9241037eds.126.1610209869640; Sat, 09 Jan 2021 08:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610209869; cv=none; d=google.com; s=arc-20160816; b=cOIyCbhydA+VlvSM+xpEizd9Q/dJ64/JTPCEOz8aVAMrJdb/uEW1qOOUdNEPKPnPl/ K75kjr4CY8X5xfaFMUtc+pzNbrj8FNThJZ2s5HEWrEpLrdlfZDjl128pBhVZ/DKWp0vr 876mNinJVrUlijYSfvHhQmmt+Ms3gOVnLNsUjgkwlTf/4nrOufhbIHMtWr4npXBEYyJv 8TcZOlp8SIzdLka8Ov6oJTmOzF9qyZKsyEYu3WukQXo3vmd9uy/T6cR/digVEhyWJZTb UOyqJ/qVJdHcgsFj5QJaqU2rcpn/dRuw77FRif2SOr5IGKakcUQHFH75uLSf0WnYO4tA SziQ== 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:dkim-signature; bh=O/XD7xJpa0JpoEabIf++Vso8fJLTJb9fbYKc1Swo5w8=; b=fgF9M4BgMWAufokSPZSqjyyV1vqjS4nGtTNjLKrzl9ZxmA8KwqAzWk44PIACzho+Kr Zq1tTxLLmtjU5uHUpYAPe4Be8CHJPxN5ABfyXENTxgcBG6NxqXet7l292KCHH3+p0+RI 5fuG6oqMwjtLPQjm1fs3QyKA2wmXeYtaxxqPL/HSpUWrin2TjwUYPRce39ZC2zNQ4tql mrBIaYiXeKDlbFBKs/jsDsxFbgPCPUSTSLekG87vLhvoVfUV9t9fnQiQFF5TRFmSXMiB dsGppFD16y4oMDmzmgYARMyKlLuhPXrUs1FIGDqApmPmFR7dVodsSPIr4TA5KlHAl7E8 wIqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=mG9EFIRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id t20si5108958edw.31.2021.01.09.08.30.46; Sat, 09 Jan 2021 08:31:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=mG9EFIRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726607AbhAIQ2r (ORCPT + 99 others); Sat, 9 Jan 2021 11:28:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbhAIQ2q (ORCPT ); Sat, 9 Jan 2021 11:28:46 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A448C061786; Sat, 9 Jan 2021 08:27:51 -0800 (PST) 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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To: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=O/XD7xJpa0JpoEabIf++Vso8fJLTJb9fbYKc1Swo5w8=; b=mG9EFIRX3l3qITkxxx8NZ/GM4 nx/KH5hc9L5ZMjUyGgC4bOYRQWliOq0odWK/go8E/QyXz/8nfbl44xmLfmF1zdMCjzxvCK6CrMV9N 0Uh6/JfFlVQaS1o0mmQkqerOdy83XACMKJmE0Elgx5/4dwLFKNPAhyGSboHwwqoNfyrWR/XXpUv2M vkm1U4veiJ8W1UJlcgBdmSq+KK+zJQoEAftDdlx99TmSAntcEAgDXtV1TbjWp06hu55SSDfrvBLOe o0BsHjBtmHgvExuhKdEpR8Y/L0HqmolFTXKDIQ4p65pFJO1kMQH2+mTJm1xdmkCNwrex6LRI+XhVg nyLI3RbJQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:45782) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyH5d-0005CN-G8; Sat, 09 Jan 2021 16:27:45 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kyH5c-0003Jy-5Q; Sat, 09 Jan 2021 16:27:44 +0000 Date: Sat, 9 Jan 2021 16:27:44 +0000 From: Russell King - ARM Linux admin To: Andrew Lunn Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , "David S. Miller" , Jakub Kicinski , Thomas Schreiber , Heiner Kallweit , Marek =?iso-8859-1?Q?Beh=FAn?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set Message-ID: <20210109162744.GA1551@shell.armlinux.org.uk> References: <20201230154755.14746-1-pali@kernel.org> <20210106153749.6748-1-pali@kernel.org> <20210106153749.6748-3-pali@kernel.org> <20210109154601.GZ1551@shell.armlinux.org.uk> 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.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 09, 2021 at 04:54:22PM +0100, Andrew Lunn wrote: > On Sat, Jan 09, 2021 at 03:46:01PM +0000, Russell King - ARM Linux admin wrote: > > On Thu, Jan 07, 2021 at 05:54:28PM +0100, Andrew Lunn wrote: > > > On Wed, Jan 06, 2021 at 04:37:48PM +0100, Pali Roh?r wrote: > > > > From: Russell King > > > > > > > > Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set both > > > > SFP_OPTIONS_LOS_INVERTED and SFP_OPTIONS_LOS_NORMAL bits in their EEPROM. > > > > > > > > Such combination of bits is meaningless so assume that LOS signal is not > > > > implemented. > > > > > > > > This patch fixes link carrier for GPON SFP module Ubiquiti U-Fiber Instant. > > > > > > > > Signed-off-by: Russell King > > > > Signed-off-by: Pali Roh?r > > > > > > Reviewed-by: Andrew Lunn > > > > I'd like to send this patch irrespective of discussion on the other > > patches - I already have it committed in my repository with a different > > description, but the patch content is the same. > > > > Are you happy if I transfer Andrew's r-b tag > > Hi Russell > > If it is the same contest, no problem. I can always NACK it later... The commit message is different: net: sfp: cope with SFPs that set both LOS normal and LOS inverted The SFP MSA defines two option bits in byte 65 to indicate how the Rx_LOS signal on SFP pin 8 behaves: bit 2 - Loss of Signal implemented, signal inverted from standard definition in SFP MSA (often called "Signal Detect"). bit 1 - Loss of Signal implemented, signal as defined in SFP MSA (often called "Rx_LOS"). Clearly, setting both bits results in a meaningless situation: it would mean that LOS is implemented in both the normal sense (1 = signal loss) and inverted sense (0 = signal loss). Unfortunately, there are modules out there which set both bits, which will be initially interpret as "inverted" sense, and then, if the LOS signal changes state, we will toggle between LINK_UP and WAIT_LOS states. Change our LOS handling to give well defined behaviour: only interpret these bits as meaningful if exactly one is set, otherwise treat it as if LOS is not implemented. Signed-off-by: Russell King As I say, the actual patch is the same. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!