summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
diff options
context:
space:
mode:
authorQianqian Xie2016-03-22 09:06:26 +0100
committerDavid S. Miller2016-03-22 20:45:58 +0100
commit6f80563c03524c658bb4788fa0973f43108670c4 (patch)
tree8f4ee826e233ab17c86fa972d81f0bbcb4203112 /drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
parentnet: hns: fixed the bug about GMACs mac setting (diff)
downloadkernel-qcow2-linux-6f80563c03524c658bb4788fa0973f43108670c4.tar.gz
kernel-qcow2-linux-6f80563c03524c658bb4788fa0973f43108670c4.tar.xz
kernel-qcow2-linux-6f80563c03524c658bb4788fa0973f43108670c4.zip
net: hns: set xge statistic reg as read only
As the user manual of HNS V2 describs, XGE_DFX_CTRL_CFG.xge_dfx_ctrl_cfg should be configed as zero if we want xge statistic reg to be read only. But HNS V1 gets the other meanings. It needs to be identified the process and then config it rightly. Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index 38fc5be3870c..5c1ac9ba1bf2 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -748,8 +748,9 @@ static void hns_dsaf_tbl_stat_en(struct dsaf_device *dsaf_dev)
*/
static void hns_dsaf_rocee_bp_en(struct dsaf_device *dsaf_dev)
{
- dsaf_set_dev_bit(dsaf_dev, DSAF_XGE_CTRL_SIG_CFG_0_REG,
- DSAF_FC_XGE_TX_PAUSE_S, 1);
+ if (AE_IS_VER1(dsaf_dev->dsaf_ver))
+ dsaf_set_dev_bit(dsaf_dev, DSAF_XGE_CTRL_SIG_CFG_0_REG,
+ DSAF_FC_XGE_TX_PAUSE_S, 1);
}
/* set msk for dsaf exception irq*/