Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14ae335a authored by Qianqian Xie's avatar Qianqian Xie Committed by David S. Miller
Browse files

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: default avatarQianqian Xie <xieqiaqian@huawei.com>
Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b03fd85
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1114,11 +1114,11 @@ 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;
		}
	}

	dsaf_set_dev_bit(dsaf_dev, DSAF_PAUSE_CFG_REG + mac_id * 4,
			 DSAF_MAC_PAUSE_RX_EN_B, !!en);