[MTHCA] Report completion error after filling WC
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 29 Mar 2006 18:08:06 +0000 (18:08 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 29 Mar 2006 18:08:06 +0000 (18:08 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@260 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/user/mlnx_uvp_cq.c

index dfc587f..9a3d7f2 100644 (file)
@@ -356,13 +356,6 @@ static inline int mthca_poll_one(struct mthca_cq *cq,
                wq->last_comp = wqe_index;
        }
 
-       if (is_error) {
-               err = handle_error_cqe(cq, *cur_qp, wqe_index, is_send,
-                                      (struct mthca_err_cqe *) cqe,
-                                      entry, &free_cqe);
-               goto out;
-       }
-
        if (is_send) {
                entry->recv.ud.recv_opt = 0;
                switch (cqe->opcode) {
@@ -429,7 +422,14 @@ static inline int mthca_poll_one(struct mthca_cq *cq,
                        IB_RECV_OPT_GRH_VALID : 0;
        }
 
-       entry->status = IB_WCS_SUCCESS;
+
+       if (is_error) {
+               err = handle_error_cqe(cq, *cur_qp, wqe_index, is_send,
+                                      (struct mthca_err_cqe *) cqe,
+                                      entry, &free_cqe);
+       }
+       else
+               entry->status = IB_WCS_SUCCESS;
 
 out:
        if (likely(free_cqe)) {