diff mbox series

[for-next] RDMA/hns: Add vendor_err info to error WC

Message ID 1624362836-11631-1-git-send-email-liweihang@huawei.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [for-next] RDMA/hns: Add vendor_err info to error WC | expand

Commit Message

Weihang Li June 22, 2021, 11:53 a.m. UTC
From: Lang Cheng <chenglang@huawei.com>

ULP can get more error information of CQ through verbs instead of prints.

Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jason Gunthorpe June 22, 2021, 6:29 p.m. UTC | #1
On Tue, Jun 22, 2021 at 07:53:56PM +0800, Weihang Li wrote:
> From: Lang Cheng <chenglang@huawei.com>
> 
> ULP can get more error information of CQ through verbs instead of prints.
> 
> Signed-off-by: Lang Cheng <chenglang@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 069c7cd..5524938 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3544,6 +3544,7 @@  static void get_cqe_status(struct hns_roce_dev *hr_dev, struct hns_roce_qp *qp,
 	ibdev_err(&hr_dev->ib_dev, "error cqe status 0x%x:\n", cqe_status);
 	print_hex_dump(KERN_ERR, "", DUMP_PREFIX_NONE, 16, 4, cqe,
 		       cq->cqe_size, false);
+	wc->vendor_err = hr_reg_read(cqe, CQE_SUB_STATUS);
 
 	/*
 	 * For hns ROCEE, GENERAL_ERR is an error type that is not defined in