lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Jan 2017 12:00:46 +0100
From:   Zefir Kurtisi <>
To:     Timur Tabi <>,
Subject: Re: [PATCH 2/2] at803x: double check SGMII side autoneg

On 01/18/2017 12:32 AM, Timur Tabi wrote:
> On 10/24/2016 05:40 AM, Zefir Kurtisi wrote:
>> As a result, if you ever see a warning
>> '803x_aneg_done: SGMII link is not ok' you will
>> end up having an Ethernet link up but won't get
>> any data through. This should not happen, if it
>> does, please contact the module maintainer.
> I am now seeing this:
> ubuntu@...ntu:~$ ifup eth1
> ubuntu@...ntu:~$ [  588.687689] 803x_aneg_done: SGMII link is not ok
> [  588.694909] qcom-emac QCOM8070:00 eth1: Link is Up - 1Gbps/Full - flow control
> rx/tx
> [  588.703985] qcom-emac QCOM8070:00 eth1: Link is Up - 1Gbps/Full - flow control
> rx/tx
> ubuntu@...ntu:~$ ping
> PING ( 56(84) bytes of data.
> 64 bytes from icmp_seq=1 ttl=64 time=0.502 ms
> 64 bytes from icmp_seq=2 ttl=64 time=0.244 ms
> 64 bytes from icmp_seq=3 ttl=64 time=0.220 ms
> ^C
> --- ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2107ms
> rtt min/avg/max/mdev = 0.220/0.322/0.502/0.127 ms
> So I do get the "SGMII link is not ok" message, but my connection is fine.  I
> don't know why the link-up message is displayed twice.  It's only displayed once
> if I use the genphy driver instead of the at803x driver.
> I'm going to debug the at803x to see what it does that causes the double link-up
> message.

The fact that you see the warning means external autoneg completes before the
SGMII side in best case or SGMII link remains down in worst case. To prevent this,
I am using a private variant of the at8031 driver that ensures that the SGMII
autoneg is never restarted. If you ever end up with a dead link, feel free to test
with the related functions below.


static int nt_at8031_no_soft_reset(struct phy_device *phydev)
	return 0;

 * Powering the chip down occasionally causes SGMII link loss, which in turn
 * causes the connection to gianfar to remain down.
 * To prevent permanent link loss, instead of power down just isolate pins.
static int nt_at8031_suspend(struct phy_device *phydev)
	phy_write(phydev, MII_BMCR, phy_read(phydev, MII_BMCR) | BMCR_ISOLATE);
	return 0;

static int nt_at8031_resume(struct phy_device *phydev)
	phy_write(phydev, MII_BMCR, phy_read(phydev, MII_BMCR) & ~BMCR_ISOLATE);
	return 0;

Powered by blists - more mailing lists