linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Bornyakov <i.bornyakov@metrotek.ru>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	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
Date: Tue, 13 Apr 2021 13:06:23 +0300	[thread overview]
Message-ID: <20210413100623.4shge3pwq3vbpxhn@dhcp-179.ddg> (raw)
In-Reply-To: <20210413092348.GM1463@shell.armlinux.org.uk>

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.


  reply	other threads:[~2021-04-13 10:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 12:16 [PATCH net-next 0/2] net: phy: marvell-88x2222: a couple of improvements Ivan Bornyakov
2021-04-12 12:16 ` [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational Ivan Bornyakov
2021-04-12 23:32   ` Marek Behún
2021-04-13  7:13     ` Ivan Bornyakov
2021-04-13 13:07       ` Andrew Lunn
2021-04-12 23:40   ` Andrew Lunn
2021-04-13  7:19     ` Ivan Bornyakov
2021-04-13  9:23       ` Russell King - ARM Linux admin
2021-04-13 10:06         ` Ivan Bornyakov [this message]
2021-04-13 13:12         ` Andrew Lunn
2021-04-13 13:16           ` Russell King - ARM Linux admin
2021-04-12 12:17 ` [PATCH net-next 2/2] net: phy: marvell-88x2222: swap 1G/10G modes on autoneg Ivan Bornyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413100623.4shge3pwq3vbpxhn@dhcp-179.ddg \
    --to=i.bornyakov@metrotek.ru \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=system@metrotek.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).