aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-01-06 16:13:32 -0500
committerRoland Dreier <rolandd@cisco.com>2006-01-06 16:13:32 -0500
commit0f8e8f9607d77ffc1f9820446dfcf781e96fdfd4 (patch)
tree3e865beb1c3e1cc53b9644ada1415ea11a8f4b77 /drivers/infiniband/hw
parent5ceb74557c71465cf8f6fda050aac00e53f9ad3d (diff)
IB/mthca: Fill in vendor_err field in completion with error
Fill vendor_err field in completion with error. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cq.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index fcef8dc2c121..96f1a86bf049 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -128,12 +128,12 @@ struct mthca_err_cqe {
128 __be32 my_qpn; 128 __be32 my_qpn;
129 u32 reserved1[3]; 129 u32 reserved1[3];
130 u8 syndrome; 130 u8 syndrome;
131 u8 reserved2; 131 u8 vendor_err;
132 __be16 db_cnt; 132 __be16 db_cnt;
133 u32 reserved3; 133 u32 reserved2;
134 __be32 wqe; 134 __be32 wqe;
135 u8 opcode; 135 u8 opcode;
136 u8 reserved4[2]; 136 u8 reserved3[2];
137 u8 owner; 137 u8 owner;
138}; 138};
139 139
@@ -342,8 +342,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
342 } 342 }
343 343
344 /* 344 /*
345 * For completions in error, only work request ID, status (and 345 * For completions in error, only work request ID, status, vendor error
346 * freed resource count for RD) have to be set. 346 * (and freed resource count for RD) have to be set.
347 */ 347 */
348 switch (cqe->syndrome) { 348 switch (cqe->syndrome) {
349 case SYNDROME_LOCAL_LENGTH_ERR: 349 case SYNDROME_LOCAL_LENGTH_ERR:
@@ -405,6 +405,8 @@ static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
405 break; 405 break;
406 } 406 }
407 407
408 entry->vendor_err = cqe->vendor_err;
409
408 /* 410 /*
409 * Mem-free HCAs always generate one CQE per WQE, even in the 411 * Mem-free HCAs always generate one CQE per WQE, even in the
410 * error case, so we don't have to check the doorbell count, etc. 412 * error case, so we don't have to check the doorbell count, etc.