]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: bugfix for is_valid_csq_clean_head()
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 30 Oct 2018 13:50:48 +0000 (21:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2018 19:42:38 +0000 (12:42 -0700)
commit1c527f63f62d0df545ac57389686ab087b891c75
tree47c5785f1c36d9c89f7c227e516d4bc7f89d279d
parent774ec3706375aa0ba1e73f51397c4a0bc4b8b7e0
net: hns3: bugfix for is_valid_csq_clean_head()

The HEAD pointer of the hardware command queue maybe equal to the command
queue's next_to_use in the driver, so that does not belong to the invalid
HEAD pointer, since the hardware may not process the command in time,
causing the HEAD pointer to be too late to update. The variables' name
in this function is unreadable, so give them a more readable one.

Fixes: 51318616d9f3 ("net: hns3: fix a dead loop in hclge_cmd_csq_clean")
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