summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorQianqian Xie <xieqiaqian@huawei.com>2016-06-21 06:56:22 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-21 11:51:54 +0300
commit14ae335a8599d735d19f600c29c6249dd2c3f7a8 (patch)
tree14d2fe045cb40027191d23bb1a0fbb99fbcd3752 /drivers/net/ethernet/hisilicon
parent0b03fd8528f7bf00b5c058212d69f92cf123bf30 (diff)
downloadlinux-14ae335a8599d735d19f600c29c6249dd2c3f7a8.tar.xz
net: hns: fix hns dsaf v1 dont support tx_pause close
For service port, hns dsaf v1 support to close tx_pause. However, the port will be invalid when it run command ethtool to close tx_pause. This patch will fix it. Signed-off-by: Qianqian Xie <xieqiaqian@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')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index ac03c4a53e08..422f97d5218d 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -1114,10 +1114,10 @@ int hns_dsaf_set_rx_mac_pause_en(struct dsaf_device *dsaf_dev, int mac_id,
u32 en)
{
if (AE_IS_VER1(dsaf_dev->dsaf_ver)) {
- if (!en)
+ if (!en) {
dev_err(dsaf_dev->dev, "dsafv1 can't close rx_pause!\n");
-
- return -EINVAL;
+ return -EINVAL;
+ }
}
dsaf_set_dev_bit(dsaf_dev, DSAF_PAUSE_CFG_REG + mac_id * 4,