]> 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)
commit682571855809add848cc56681a754fd3f5ae5507
tree4545756888e36ce0c4622c809f42ecf2d9f0db8e
parent25dadd97ac20b74334a524e28507a9a9d9f96891
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