net: hns3: bugfix for the initialization of command queue's spin lock
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 30 Oct 2018 13:50:46 +0000 (21:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:12:59 +0000 (16:12 +0100)
commit91a52a44195e205aaf8a275621bf8fa9cc082b02
treecc2318ee1ae6ca8579ded47d6fe3127f46faa1bb
parent355ec07561044fadd1edc071315105cbdf9f79bf
net: hns3: bugfix for the initialization of command queue's spin lock

[ Upstream commit b2f74dbaf12bf59ff35d451005b3cdee78232ff0 ]

The spin lock of the command queue only need to be initialized once
when the driver initializes the command queue. It is not necessary to
initialize the spin lock when resetting. At the same time, the
modification of the queue member should be performed after acquiring
the lock.

Fixes: 3efb960f056d ("net: hns3: Refactor the initialization of command queue")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c