Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2488723pxb; Tue, 13 Apr 2021 03:14:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrQ9LViEguPN21Vzhc5Ivbv1kiq/SJo2+l4t0Ctyga1Fvwrw5Ya6PJrVRSk7D2yGeRiMBN X-Received: by 2002:aa7:c40b:: with SMTP id j11mr34065676edq.141.1618308865745; Tue, 13 Apr 2021 03:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618308865; cv=none; d=google.com; s=arc-20160816; b=yclnVmgs+4Lqj/pdYPhQtGoB40ZgucnYopY0lVVxr1k8IcdD5wtxPEUosf7CY2XNWf wntrcfc3NJPZLOJ8gd2Y3LIDFOauJviSFaEqieX0/sDVudt0guhCYM7bK+UM6cY0n15V FBCg2j4pYJn6iFDfljtNzP78yT5ITxFvp5eVtiOUKS4Fv1OdXs8ZLQgzF2rj3QFjH2qu rlk9pTgiie8A4m9ijpsy6X6al9Nt74RUrQZDnNKlo4np3M4GHiZhv4c2/NGqOul7h4I2 CFlJ//4eAXpc0S6FJIaDMHCd8AltCANnzQKQ3dnZS9yTTlnV4MS1lzVKJi1gr3VuwxnY L/5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mkR/TRPvVXJf1vUgy5bHml8Filpx/BWZ1dWRBXIUpME=; b=qdnU4PacepAQL/YLDGgfFCVKTZzuDYUgdCLiHMaDHk9Kf32qtkEO1c4n3n5wSmsbRd iYkNqkqSzDksLTB1P0FqCaGEyI8tMxqDrOUqDFRfYHumHEuy+PLsaQ0D9AgGdra21IuF 4/PK3zKOjavQ+6qgYGKKx3qZ3qIsJn3a0hWoBxnLoyj2ysyTjjkOg5phz5raPFB2fDhY CoI0HD7hLGh2SABsUqlOK5TgVy3dlTRJwtW1mg3tAHJvKv5FUO8ofOiaOVyY9+DFo97Q EJZ3Ev+0wuprsA8+CrGQ8jViGJk5y4G6fCaaunDfqXCqsPylsgtMGMrU7bQd+CKUq8m8 TS0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=VPYYSctH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga30si4668778ejc.173.2021.04.13.03.14.01; Tue, 13 Apr 2021 03:14:25 -0700 (PDT) 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 header.i=@metrotek.ru header.s=mail header.b=VPYYSctH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241746AbhDMKHI (ORCPT + 99 others); Tue, 13 Apr 2021 06:07:08 -0400 Received: from mail.pr-group.ru ([178.18.215.3]:64337 "EHLO mail.pr-group.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbhDMKHH (ORCPT ); Tue, 13 Apr 2021 06:07:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to: references; bh=HEf7VqC2Wss6FYGxSqP/7RNfedhszWUGw4BQrDP1tyg=; b=VPYYSctHSk/nphLEpmM+D6Sq1rQQAuOB8ga0qbgQoY4DYn0KzZBx2DUSD7u9Zxf78aeXZWgYlO/jg vq9RtT5ZTmZX7yUG3xHHLI9weQL53gP204ndj9FvsZ/qdGOXiTzmq8Rq0Q7oWYUFv+xytAuVLhHgF1 QlmE2zs6haMam5K7v9zwUJtBqSKVaRc51uV+iYXLXHpVWaQTkW9CIbLWfsDItrGeP/qZ0OLzFB9ml8 l//BQkCWLcvIZmn8d5zGzOeqPdgrKrOcbDdtvXVP15k+QFyLzD7JagOsdYeMpLKorxu1jNDgoPX0uL UD2a8VFEaoBlvecWoeBU0GTKYbC3a4Q== X-Spam-Status: No, hits=0.0 required=3.4 tests=AWL: 0.000, BAYES_00: -1.665, CUSTOM_RULE_FROM: ALLOW, TOTAL_SCORE: -1.665,autolearn=ham X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from dhcp-179.ddg ([85.143.252.66]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Tue, 13 Apr 2021 13:06:31 +0300 Date: Tue, 13 Apr 2021 13:06:23 +0300 From: Ivan Bornyakov To: Russell King - ARM Linux admin Cc: Andrew Lunn , system@metrotek.ru, hkallweit1@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational Message-ID: <20210413100623.4shge3pwq3vbpxhn@dhcp-179.ddg> References: <614b534f1661ecf1fff419e2f36eddfb0e6f066d.1618227910.git.i.bornyakov@metrotek.ru> <20210413071930.52vfjkewkufl7hrb@dhcp-179.ddg> <20210413092348.GM1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210413092348.GM1463@shell.armlinux.org.uk> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 10:23:48AM +0100, Russell King - ARM Linux admin wrote: > On Tue, Apr 13, 2021 at 10:19:30AM +0300, Ivan Bornyakov wrote: > > On Tue, Apr 13, 2021 at 01:40:32AM +0200, Andrew Lunn wrote: > > > On Mon, Apr 12, 2021 at 03:16:59PM +0300, Ivan Bornyakov wrote: > > > > Some SFP modules uses RX_LOS for link indication. In such cases link > > > > will be always up, even without cable connected. RX_LOS changes will > > > > trigger link_up()/link_down() upstream operations. Thus, check that SFP > > > > link is operational before actual read link status. > > > > > > Sorry, but this is not making much sense to me. > > > > > > LOS just indicates some sort of light is coming into the device. You > > > have no idea what sort of light. The transceiver might be able to > > > decode that light and get sync, it might not. It is important that > > > mv2222_read_status() returns the line side status. Has it been able to > > > achieve sync? That should be independent of LOS. Or are you saying the > > > transceiver is reporting sync, despite no light coming in? > > > > > > Andrew > > > > Yes, with some SFP modules transceiver is reporting sync despite no > > light coming in. So, the idea is to check that link is somewhat > > operational before determing line-side status. > > Indeed - it should be a logical and operation - there is light present > _and_ the PHY recognises the signal. This is what the commit achieves, > although (iirc) doesn't cater for the case where there is no SFP cage > attached. > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! Correct, it does not, I only have HW with SFP cage attached.