Commit 8ed1d1a6 authored by WenChun Fei's avatar WenChun Fei Committed by xuqi
Browse files

hns3 udma: delete irrl and trrl table.

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAYJ6Q


CVE: NA

--------------------------------------------------------

This MR major contains the following modifications:
1. delete irrl and trrl table.
2. handle the fail to create resources when insmod ko.
3. modify create jfr qp attr uctx param.
4. fix the issue that the page offset is not aligned when DCA is enabled.
5. restrict only support rts when user modify tp.
6. modify the mode for transferring the urma pattern1.

Fixes: d46549c6 ("hns3 udma: add prefix hns3 for udma")
Signed-off-by: default avatarQi Xu <xuqi54@hisilicon.com>
Signed-off-by: default avatarWenChun Fei <feiwenchun@huawei.com>
parent 31421c83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* Huawei UDMA Linux driver
/* Huawei HNS3_UDMA Linux driver
 * Copyright (c) 2023-2023 Hisilicon Limited.
 *
 * This program is free software; you can redistribute it and/or modify it
+3 −1
Original line number Diff line number Diff line
@@ -389,9 +389,11 @@ void hns3_udma_unregister_debugfs(struct hns3_udma_dev *udma_dev)
}

/* debugfs for hns3_udma module */
void hns3_udma_init_debugfs(void)
struct dentry *hns3_udma_init_debugfs(void)
{
	hns3_udma_dbgfs_root = debugfs_create_dir("hns3_udma", NULL);

	return hns3_udma_dbgfs_root;
}

void hns3_udma_cleanup_debugfs(void)
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ struct dca_qp_stats {
	uint32_t sge_size;
};

void hns3_udma_init_debugfs(void);
struct dentry *hns3_udma_init_debugfs(void);
void hns3_udma_cleanup_debugfs(void);
void hns3_udma_register_debugfs(struct hns3_udma_dev *udma_dev);
void hns3_udma_unregister_debugfs(struct hns3_udma_dev *udma_dev);
+0 −2
Original line number Diff line number Diff line
@@ -252,8 +252,6 @@ struct hns3_udma_caps {
	uint32_t		reserved_lkey;
	int			mtpt_entry_sz;
	int			qpc_sz;
	int			irrl_entry_sz;
	int			trrl_entry_sz;
	int			cqc_entry_sz;
	int			scc_ctx_sz;
	int			qpc_timer_entry_sz;
+4 −4
Original line number Diff line number Diff line
@@ -1187,7 +1187,7 @@ static void hns3_udma_dfx_list_free(int num)
	DFX_LIST_FREE(jfc);
}

static int hns3_udma_dfx_add_hns3_udma_device(struct hns3_udma_dev *udma_dev)
static int hns3_udma_dfx_add_device(struct hns3_udma_dev *udma_dev)
{
	int ret;
	int i;
@@ -1308,7 +1308,7 @@ int hns3_udma_dfx_init(struct hns3_udma_dev *udma_dev)
		dev_info(drv_device, "hns3_udma dfx create chr device success.\n");
	}

	ret = hns3_udma_dfx_add_hns3_udma_device(udma_dev);
	ret = hns3_udma_dfx_add_device(udma_dev);
	if (ret) {
		dev_err(drv_device, "hns3_udma dfx add hns3_udma device failed.\n");
		goto add_device_failed;
@@ -1325,7 +1325,7 @@ int hns3_udma_dfx_init(struct hns3_udma_dev *udma_dev)
	return ret;
}

static void hns3_udma_dfx_remove_hns3_udma_device(struct hns3_udma_dev *udma_dev)
static void hns3_udma_dfx_remove_device(struct hns3_udma_dev *udma_dev)
{
	int i;

@@ -1355,7 +1355,7 @@ void hns3_udma_dfx_uninit(struct hns3_udma_dev *udma_dev)
		return;
	}

	hns3_udma_dfx_remove_hns3_udma_device(udma_dev);
	hns3_udma_dfx_remove_device(udma_dev);
	if (!hns3_udma_dev_count) {
		dev_info(drv_device, "hns3_udma dfx remove chr device.\n");
		hns3_udma_dfx_chrdev_destroy();
Loading