]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitff788de0f76d1c33f364a247c91e426c6fc7ab3b
tree4545756888e36ce0c4622c809f42ecf2d9f0db8e
parenta029090dd4ebde87eae10643acebdc6548aea9f9
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