Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2399443pxb; Tue, 13 Apr 2021 00:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVbe4e2DRVMd2XaBhxOmqegGrmdcNpVKbCUaVr79g39oD/Phf/6dd9zJRyGCEXR3BKASD3 X-Received: by 2002:a05:6402:5146:: with SMTP id n6mr18941338edd.299.1618299084478; Tue, 13 Apr 2021 00:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618299084; cv=none; d=google.com; s=arc-20160816; b=ejPDrSmK+KgJx4lPFjncCkVg2/3N550bRhh4P0YzuMKtlHW8qn9RrTe1sYhJNZPoun Pt4t9jvjBxui3lSYkpMjTVPlsNtsJyG3vbW1pzfhE3brzH4jmtZ8zyuz8FJWPUm0Pq92 TltWnD4tEQImgv1wRUnb3eBInP5Pp1dzcDMILDewSWvKOOiuy80yak5QM4nT80MhFDYd EBOy65YYE6RWyykuhIwY/w8qRGzJfL+/0xG6g9MrscJL35xUl6nQ0UCdvBFI5xZRcbs2 74mIm1QTLxZPyTv5GY/2ZUUCGlnofAvSm4qeXhqqAf4J5Jlw4ngbVVeVkOwSJlBvzkeh TFsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ywbLTjA1v9T6g1QM+F7x689cGv8v7QqBX2er9/F9hBk=; b=Iu4oiSC+0MmHHUYAyNXoqVEGCOSWKhwQJAljMaxogg5/uNY/IHnVrbBMlEYXsovLnd UZvqVO6GuMos8Y6BiTVocTTfL2FjSFgzG5PUsTRW65H0tN8X3VfloX9euEIlkj67Ikv0 cLmmYT0/y5aqeTuhADreUA11T5sUDCI3GC5FPFUjI9iFG0b22J8HQkzmPzeppVQx4Sjq c6W6wb1evyv3POjVe6Fa+bVoMVtPL2RL7+69aeUA+PaBpdk9xkMq1al4BThGWjsjj+1J 83QQEXs0ZZMP6IHfBOXA4sJ9e2wjxmyrWgODkXLYyX/9OvZUEK0THMUXj/LaQCPNtTbN CC6A== ARC-Authentication-Results: i=1; mx.google.com; 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 dj16si9229122edb.368.2021.04.13.00.31.01; Tue, 13 Apr 2021 00:31:24 -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; 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 S239240AbhDLXlG (ORCPT + 99 others); Mon, 12 Apr 2021 19:41:06 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46912 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237567AbhDLXlF (ORCPT ); Mon, 12 Apr 2021 19:41:05 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lW6AS-00GNdF-QW; Tue, 13 Apr 2021 01:40:32 +0200 Date: Tue, 13 Apr 2021 01:40:32 +0200 From: Andrew Lunn To: Ivan Bornyakov Cc: system@metrotek.ru, hkallweit1@gmail.com, linux@armlinux.org.uk, 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: References: <614b534f1661ecf1fff419e2f36eddfb0e6f066d.1618227910.git.i.bornyakov@metrotek.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <614b534f1661ecf1fff419e2f36eddfb0e6f066d.1618227910.git.i.bornyakov@metrotek.ru> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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