lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1457409107-77001-1-git-send-email-lisheng011@huawei.com>
Date:	Tue, 8 Mar 2016 11:51:47 +0800
From:	Lisheng <lisheng011@...wei.com>
To:	<davem@...emloft.net>
CC:	<yisen.zhuang@...wei.com>, <yankejian@...wei.com>,
	<xieqianqian@...wei.com>, <huangdaode@...ilicon.com>,
	<salil.mehta@...wei.com>, <andriy.shevchenko@...ux.intel.com>,
	<netdev@...r.kernel.org>, <haifeng.wei@...wei.com>,
	<charles.chenxin@...wei.com>, <linuxarm@...wei.com>
Subject: [PATCH net] net: hns: set xge statistic reg as read only

From: Qianqian Xie <xieqianqian@...wei.com>

As the user manual 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 the
older hisilicon arm64 process gets the other meanings. So it seems that
we need to identify the process and then config it rightly.

Signed-off-by: Qianqian Xie <xieqianqian@...wei.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 5 +++--
 1 file 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 9439f04..7fe1c1c 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -714,8 +714,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*/
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ