net: thunderx: Fix link status reporting
authorSunil Goutham <sgoutham@cavium.com>
Mon, 27 Jun 2016 10:00:02 +0000 (15:30 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2016 09:14:13 +0000 (05:14 -0400)
commit3f4c68cfde30caa1f6d8368fd19590671411ade2
tree66970b40777a89fb709b8b173f63829c57e64669
parentf5074d0ce2f8b45b3d5998a280edd2066c0cfcda
net: thunderx: Fix link status reporting

Check for SMU RX local/remote faults along with SPU LINK
status. Otherwise at times link is UP at our end but DOWN
at link partner's side. Also due to an issue in BGX it's
rarely seen that initialization doesn't happen properly
and SMU RX reports faults with everything fine at SPU.
This patch tries to reinitialize LMAC to fix it.

Also fixed LMAC disable sequence to properly bring down link.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: Tao Wang <tao.wang@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c
drivers/net/ethernet/cavium/thunder/thunder_bgx.h