]> Pileus Git - ~andy/linux/blobdiff - drivers/infiniband/hw/mthca/mthca_cq.c
IB: Change CQE "csum_ok" field to a bit flag
[~andy/linux] / drivers / infiniband / hw / mthca / mthca_cq.c
index 53157b86a1ba10f983c18d847dc781e97ee88fea..40ba8333815571ff2b8c5e24e173713f3a16e66e 100644 (file)
@@ -643,7 +643,8 @@ static inline int mthca_poll_one(struct mthca_dev *dev,
                entry->wc_flags   |= cqe->g_mlpath & 0x80 ? IB_WC_GRH : 0;
                checksum = (be32_to_cpu(cqe->rqpn) >> 24) |
                                ((be32_to_cpu(cqe->my_ee) >> 16) & 0xff00);
-               entry->csum_ok = (cqe->sl_ipok & 1 && checksum == 0xffff);
+               entry->wc_flags   |=  (cqe->sl_ipok & 1 && checksum == 0xffff) ?
+                                                       IB_WC_IP_CSUM_OK : 0;
        }
 
        entry->status = IB_WC_SUCCESS;