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)
commit82c8ae6e8390f09c3c2b1d0a567c993dd88a281c
tree3e1160733dcb6f79492db15cf4fd0169a07d0c20
parent289f81258e03067d032f9c157c91cd1fad7b31c5
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