Commit 0baa48ea authored by Dazhao Lao's avatar Dazhao Lao
Browse files

[PATCH OLK-5.10] RDMA/hns: Support query FW cap bit

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IAL7SX



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

The driver does not know which functions are supported by the FW,
which may cause compatibility problems. When the new driver matches
the old firmware, the firmware returns a success message for
unsupported commands, which may cause misunderstanding.

Signed-off-by: default avatarDazhao Lao <laodazhao@huawei.com>
Reviewed-by: default avatarKe Chen <chenke54@huawei.com>
parent 37fbb7ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -983,6 +983,7 @@ struct hns_roce_caps {
	u8		congest_type;
	u8		default_congest_type;
	u8              poe_ch_num;
	u32		fw_cap;
};

enum hns_roce_device_state {
+1 −0
Original line number Diff line number Diff line
@@ -1822,6 +1822,7 @@ static int hns_roce_query_fw_ver(struct hns_roce_dev *hr_dev)

	resp = (struct hns_roce_query_fw_info *)desc.data;
	hr_dev->caps.fw_ver = (u64)(le32_to_cpu(resp->fw_ver));
	hr_dev->caps.fw_cap = le32_to_cpu(resp->fw_cap);

	return 0;
}
+3 −1
Original line number Diff line number Diff line
@@ -1008,7 +1008,9 @@ struct hns_roce_query_version {

struct hns_roce_query_fw_info {
	__le32 fw_ver;
	__le32 rsv[5];
	__le32 rsv[3];
	__le32 fw_cap;
	__le32 rsv1[1];
};

struct hns_roce_func_clear {