net: hns3: Fix cmdq registers initialization issue for vf
authorJian Shen <shenjian15@huawei.com>
Wed, 19 Sep 2018 17:29:55 +0000 (18:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:47:05 +0000 (18:47 +0100)
commitae95237256de0cef566c7c5f5452d55b5f393bf9
treeddbb7cc871b8565239acbb8e46ee2f8f29bc6363
parent110de23fc502a6feb2069fb4c9453b56593df7eb
net: hns3: Fix cmdq registers initialization issue for vf

[ Upstream commit 37dc9cdbdc1bd64bd3b6ea285a9c2e811404dc82 ]

According to hardware's description, the head pointer register should
be written before the tail pointer register while initializing the vf
command queue. Otherwise, it may trigger an interrupt even though there
is no command received.

Fixes: fedd0c15d288 ("net: hns3: Add HNS3 VF IMP(Integrated Management Proc) cmd interface")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c