aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
diff options
context:
space:
mode:
authorJie Wang <wangjie125@huawei.com>2021-12-31 18:22:43 +0800
committerDavid S. Miller <davem@davemloft.net>2021-12-31 14:25:47 +0000
commitaab8d1c6a5e3aaf67c4c18f6b03cf6486c435755 (patch)
tree49430fe68159819be220b5cdb66a1def45d40735 /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
parentnet: hns3: refactor VF cmdq init and uninit APIs with new common APIs (diff)
downloadlinux-aab8d1c6a5e3aaf67c4c18f6b03cf6486c435755.tar.xz
linux-aab8d1c6a5e3aaf67c4c18f6b03cf6486c435755.zip
net: hns3: delete the hclge_cmd.c and hclgevf_cmd.c
currently most cmdq APIs are unified in hclge_comm_cmd.c. Newly developed cmdq APIs should also be placed in hclge_comm_cmd.c. So there is no need to keep hclge_cmd.c and hclgevf_cmd.c. This patch moves the hclge(vf)_cmd_send to hclge(vf)_main.c and deletes the source files and makefile scripts. Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
deleted file mode 100644
index fc9dc506cfd2..000000000000
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-// Copyright (c) 2016-2017 Hisilicon Limited.
-
-#include <linux/device.h>
-#include <linux/dma-direction.h>
-#include <linux/dma-mapping.h>
-#include <linux/err.h>
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include "hclgevf_cmd.h"
-#include "hclgevf_main.h"
-#include "hnae3.h"
-
-/* hclgevf_cmd_send - send command to command queue
- * @hw: pointer to the hw struct
- * @desc: prefilled descriptor for describing the command
- * @num : the number of descriptors to be sent
- *
- * This is the main send command for command queue, it
- * sends the queue, cleans the queue, etc
- */
-int hclgevf_cmd_send(struct hclgevf_hw *hw, struct hclge_desc *desc, int num)
-{
- return hclge_comm_cmd_send(&hw->hw, desc, num, false);
-}
-
-void hclgevf_arq_init(struct hclgevf_dev *hdev)
-{
- struct hclge_comm_cmq *cmdq = &hdev->hw.hw.cmq;
-
- spin_lock(&cmdq->crq.lock);
- /* initialize the pointers of async rx queue of mailbox */
- hdev->arq.hdev = hdev;
- hdev->arq.head = 0;
- hdev->arq.tail = 0;
- atomic_set(&hdev->arq.count, 0);
- spin_unlock(&cmdq->crq.lock);
-}