]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: hns: add the code for cleaning pkt in chip
authorPeng Li <lipeng321@huawei.com>
Thu, 13 Sep 2018 18:47:00 +0000 (20:47 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 14:48:43 +0000 (16:48 +0200)
commit086062d0df0115d80e0518c0eab353c6f2bb3810
tree3de2ac02b0ff28b63e978d8547c81a65c008db40
parent3f467f6131cf27c4ead53797f4562e2cf7272711
net: hns: add the code for cleaning pkt in chip

BugLink: https://bugs.launchpad.net/bugs/1792209
If there are packets in hardware when changing the speed
or duplex, it may cause hardware hang up.

This patch adds the code for waiting chip to clean the all
pkts(TX & RX) in chip when the driver uses the function named
"adjust link".

This patch cleans the pkts as follows:
1) close rx of chip, close tx of protocol stack.
2) wait rcb, ppe, mac to clean.
3) adjust link
4) open rx of chip, open tx of protocol stack.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 31fabbee8f5c658c3fa1603c66e9e4f51ea8c2c6)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
13 files changed:
drivers/net/ethernet/hisilicon/hns/hnae.h
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
drivers/net/ethernet/hisilicon/hns/hns_enet.c