Commits
WingMan Kwok committed 93b782e8e62
net: netcp: fix error in link status display When ethernet phy presents, the ethernet link status is determined by the combined statuses of the phy link and the sgmii link. That is, ethernet link is down if either status is down, and ethernet link is up if both statuses are up. Prior to this patch, when ethernet link state changes, the phy link status is displayed, regardless whether the combined status is up or down. However, when the ethernet link goes down, due a race condition, the phy link state may not yet correctly reflect the down state while the sgmii link state does. Thus blindly displaying the phy link state is incorrect when the ethernet link goes down. This patch fixes the problem by displaying the combined state when ethernet link goes down and if phy is present. When ethernet link goes up, the phy link state is displayed if phy is present. When phy is absent, the sgmii link status is displayed in any link state change. Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>