Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2459067pxb; Tue, 13 Apr 2021 02:21:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6OEfd3bgdO1VnnOS/3sshcoC6q23+eKsoHZkEKOJV+tynunP3kuFSxJW7h6aTWEhLqb0m X-Received: by 2002:a17:906:90d4:: with SMTP id v20mr4261715ejw.275.1618305688925; Tue, 13 Apr 2021 02:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618305688; cv=none; d=google.com; s=arc-20160816; b=Lv2VUy74rmyCF+ObyBF4xYXZDU+9TL9pkBQAX7S1IukHe1owvXuRVAaNiPbKoKsZtK s6+XqNSUyeLcrzOetEQPmnAC6GND9erKDeLRERxqE5ZpQkR93d5R1k/bN2F1CoO8kmp6 PCVOLizIOwZpeOZPtyRAycYKxI12kKzq6SfMcD6XoSi53nZCrQYHc5m820JYemkak0yi zosahdw8BWUSteHjSRVEq5+RNMaWScbloQADziy/Od+RMDmWm03xnJ9xq/E+gMRooFgz pcBuYG79m8GbkFzi34Z7h2a2hSgBtMNb/ZwdxDmldyPl6zAWaZO32eYFo4zF+w8H7gSK f+jA== 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=3meqLxwLVfT/wx41lo4aeKZRZBGw9E7f9PMvI6UTRsE=; b=LIuDl9coGJnOy7xmvh6sI+AESLFqHy2a0DdB3+Ae2MDEzV5t44yjGYCQBA7OZHo6IZ HZ8XwXh8MjmxloWdwZ8b3MuTVfHb1UCTRYRLU+IIJErSYSTMDwQNM+HzCsGV2Y0egEbX x3jlelElkrAXq4smBhk3qnnOwTOIXBayOBQGs6dZQZ4sZ+bLGUlsn4C/DQ7wkTzXjvm5 dFcxfF8G3JfqznEJb2+1CRBGOx6vR362aL1n9Thg3ftRwXNitWKkMgf/LbYB+SNEzQ0H EqTKcEF6Vj9n4eC7NXHNUMo+umdyUTXKg0VS4cYlPn7RbSc32R4T/w3+opcKK5HUdnF7 H6Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=DmXqp38c; 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 g7si9255486edb.286.2021.04.13.02.21.05; Tue, 13 Apr 2021 02:21:28 -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=DmXqp38c; 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 S237595AbhDMHUI (ORCPT + 99 others); Tue, 13 Apr 2021 03:20:08 -0400 Received: from mail.pr-group.ru ([178.18.215.3]:57125 "EHLO mail.pr-group.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231932AbhDMHUH (ORCPT ); Tue, 13 Apr 2021 03:20: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=hB3SMJzbxciIfyeOiBGYdr0s9dNbL/Qk4jbtoGZXblQ=; b=DmXqp38c+wiXIAy28bTFfdtGjBDX/g846tjhbDA9FGLenh5AEwhbIDIoT8Yr6ik2dMbR2zBZZUyDa XS8Lps5ezWY4URxyMCiK4JHli8S9OEIriGdLTHN6aAotMQawMGZpYdVNNayKgY63J8hCmOajuwfHcL tNex7uUlpI8aQhzrlNV+fhmHPKo2akVDLK88gbDNjwvAdM0A3auyfe55C1K/GFlva3h2ZTNSZxHibq KGxmTpgkO1l4aB1u3NUrlu8bc6gP+D4lk+F752sv76pAfgvnXQa1E0uqtrYA8YP5+d0HYLt1LO9rnh T6v/kpHAJO4+S2k2o2qT8MFj4h0pAJw== 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 10:19:34 +0300 Date: Tue, 13 Apr 2021 10:19:30 +0300 From: Ivan Bornyakov To: Andrew Lunn 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: <20210413071930.52vfjkewkufl7hrb@dhcp-179.ddg> 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: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.