]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2018 19:42:38 +0000 (12:42 -0700)
commit40cb62e344b1fa1cd0414a177137211feca0e38a
treedbbb1183aed14b295c647af31516ad9aecc8f864
parentd461baf6dceafbb8e65ce0ff14a1e7fa4fbb1c30
net: hns3: bugfix for the initialization of command queue's spin lock

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: 06f82b01a462 ("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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c