aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
diff options
context:
space:
mode:
authorSheng Li <lisheng011@huawei.com>2016-03-24 19:08:06 +0800
committerDavid S. Miller <davem@davemloft.net>2016-03-24 14:33:07 -0400
commitc1203fe7bb34e2fe7d281882bcce8b6f107df038 (patch)
tree4545756888e36ce0c4622c809f42ecf2d9f0db8e /drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
parentnet: hns: fix warning of passing zero to 'PTR_ERR' (diff)
downloadlinux-dev-c1203fe7bb34e2fe7d281882bcce8b6f107df038.tar.xz
linux-dev-c1203fe7bb34e2fe7d281882bcce8b6f107df038.zip
net: hns: bug fix about getting hilink status for HNS v2
The hilink status reg in HNS V2 is different from HNS v1. In HNS V2, It distinguishes differnt lane status according to the bit-field of the reg. As is shown below: [0:0] ---> lane0 [1:1] ---> lane1 ... But the current driver reads the reg to get the hilink status ONLY concidering HNS V1 situation. Here is a patch to support both of them. Signed-off-by: Sheng Li <lisheng011@huawei.com> Signed-off-by: Daode Huang <huangdaode@hisilicon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
index bf62687e5ea7..e2206f938a9c 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
@@ -103,6 +103,8 @@
/*serdes offset**/
#define HNS_MAC_HILINK3_REG DSAF_SUB_SC_HILINK3_CRG_CTRL0_REG
#define HNS_MAC_HILINK4_REG DSAF_SUB_SC_HILINK4_CRG_CTRL0_REG
+#define HNS_MAC_HILINK3V2_REG DSAF_SUB_SC_HILINK3_CRG_CTRL1_REG
+#define HNS_MAC_HILINK4V2_REG DSAF_SUB_SC_HILINK4_CRG_CTRL1_REG
#define HNS_MAC_LANE0_CTLEDFE_REG 0x000BFFCCULL
#define HNS_MAC_LANE1_CTLEDFE_REG 0x000BFFBCULL
#define HNS_MAC_LANE2_CTLEDFE_REG 0x000BFFACULL