Commit 0f8e8f96 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier

IB/mthca: Fill in vendor_err field in completion with error

Fill vendor_err field in completion with error.
Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5ceb7455
...@@ -128,12 +128,12 @@ struct mthca_err_cqe { ...@@ -128,12 +128,12 @@ struct mthca_err_cqe {
__be32 my_qpn; __be32 my_qpn;
u32 reserved1[3]; u32 reserved1[3];
u8 syndrome; u8 syndrome;
u8 reserved2; u8 vendor_err;
__be16 db_cnt; __be16 db_cnt;
u32 reserved3; u32 reserved2;
__be32 wqe; __be32 wqe;
u8 opcode; u8 opcode;
u8 reserved4[2]; u8 reserved3[2];
u8 owner; u8 owner;
}; };
...@@ -342,8 +342,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, ...@@ -342,8 +342,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
} }
/* /*
* For completions in error, only work request ID, status (and * For completions in error, only work request ID, status, vendor error
* freed resource count for RD) have to be set. * (and freed resource count for RD) have to be set.
*/ */
switch (cqe->syndrome) { switch (cqe->syndrome) {
case SYNDROME_LOCAL_LENGTH_ERR: case SYNDROME_LOCAL_LENGTH_ERR:
...@@ -405,6 +405,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, ...@@ -405,6 +405,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
break; break;
} }
entry->vendor_err = cqe->vendor_err;
/* /*
* Mem-free HCAs always generate one CQE per WQE, even in the * Mem-free HCAs always generate one CQE per WQE, even in the
* error case, so we don't have to check the doorbell count, etc. * error case, so we don't have to check the doorbell count, etc.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment