summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
diff options
context:
space:
mode:
authorlipeng <lipeng321@huawei.com>2017-04-01 12:03:32 +0100
committerDavid S. Miller <davem@davemloft.net>2017-04-03 14:48:43 -0700
commit87ff7e1f460d709100cf5203738d62629ab6949b (patch)
tree5d640d03b44cfe119fc82c8aaf98d70b90af05ff /drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
parentba2d079131b494fca98cba37a5356e596a7501a6 (diff)
downloadop-kernel-dev-87ff7e1f460d709100cf5203738d62629ab6949b.zip
op-kernel-dev-87ff7e1f460d709100cf5203738d62629ab6949b.tar.gz
net: hns: Modify GMAC init TX threshold value
This patch reduces GMAC TX threshold value to avoid gmac hang-up with speed 100M/duplex half. Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: JinchuanTian <tianjinchuan1@huawei.com> Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
index 3382441..a8dbe00 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
@@ -325,6 +325,12 @@ static void hns_gmac_init(void *mac_drv)
hns_gmac_tx_loop_pkt_dis(mac_drv);
if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG)
hns_gmac_set_uc_match(mac_drv, 0);
+
+ /* reduce gmac tx water line to avoid gmac hang-up
+ * in speed 100M and duplex half.
+ */
+ dsaf_set_dev_field(drv, GMAC_TX_WATER_LINE_REG, GMAC_TX_WATER_LINE_MASK,
+ GMAC_TX_WATER_LINE_SHIFT, 8);
}
void hns_gmac_update_stats(void *mac_drv)
OpenPOWER on IntegriCloud