Subject: Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

From: Andrew Lunn <[email-masked]>
Date: Tue, 13 Apr 2021 01:40:32 +0200

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