]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
net: hns: bug fix about getting hilink status for HNS v2
authorSheng Li <lisheng011@huawei.com>
Thu, 24 Mar 2016 11:08:06 +0000 (19:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Mar 2016 18:33:07 +0000 (14:33 -0400)
commitc1203fe7bb34e2fe7d281882bcce8b6f107df038
tree4545756888e36ce0c4622c809f42ecf2d9f0db8e
parentdaa8cfd9da728b9e35c49311b23127a8859a5f3b
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>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h