]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: optimize the CSQ cmd error handling
authorPeng Li <lipeng321@huawei.com>
Fri, 28 Jun 2019 11:50:18 +0000 (19:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:39:49 +0000 (09:39 -0700)
commit2eecbbedac2bf6ca613f7b0448ec1794b5f23d6c
tree3e1160733dcb6f79492db15cf4fd0169a07d0c20
parent4d1e7df461dd4c24953071494e20b25c7911b52c
net: hns3: optimize the CSQ cmd error handling

If CMDQ ring is full, hclge_cmd_send may return directly, but IMP still
working and HW pointer changed, SW ring pointer do not match the HW
pointer. This patch update the SW pointer every time when the space is
full, so it can work normally next time if IMP and HW still working.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c