]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: use atomic_t replace u32 for arq's count
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 25 Apr 2019 12:42:49 +0000 (20:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Apr 2019 16:13:28 +0000 (12:13 -0400)
commit28b623a345706b7d8e288505d217511eec381c12
treef29dec84e702f0c6ad21b19e14256b3c2cb01cb1
parentdb98b6973a18d89ac7de9553ae6552e3a82ab151
net: hns3: use atomic_t replace u32 for arq's count

Since irq handler and mailbox task will both update arq's count,
so arq's count should use atomic_t instead of u32, otherwise
its value may go wrong finally.

Fixes: 43c85755b9e6 ("net: hns3: Changes to support ARQ(Asynchronous Receive Queue)")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c