]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/mthca/mthca_wqe.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / mthca / mthca_wqe.h
index 73f1c0b9021e65b5f05bf9ee4cdd821bc6d6daee..b3551a8dea1d691388a694ffe97cff117060b31e 100644 (file)
 #include <linux/types.h>
 
 enum {
-       MTHCA_NEXT_DBD       = 1 << 7,
-       MTHCA_NEXT_FENCE     = 1 << 6,
-       MTHCA_NEXT_CQ_UPDATE = 1 << 3,
-       MTHCA_NEXT_EVENT_GEN = 1 << 2,
-       MTHCA_NEXT_SOLICIT   = 1 << 1,
-
-       MTHCA_MLX_VL15       = 1 << 17,
-       MTHCA_MLX_SLR        = 1 << 16
+       MTHCA_NEXT_DBD          = 1 << 7,
+       MTHCA_NEXT_FENCE        = 1 << 6,
+       MTHCA_NEXT_CQ_UPDATE    = 1 << 3,
+       MTHCA_NEXT_EVENT_GEN    = 1 << 2,
+       MTHCA_NEXT_SOLICIT      = 1 << 1,
+       MTHCA_NEXT_IP_CSUM      = 1 << 4,
+       MTHCA_NEXT_TCP_UDP_CSUM = 1 << 5,
+
+       MTHCA_MLX_VL15          = 1 << 17,
+       MTHCA_MLX_SLR           = 1 << 16
 };
 
 enum {
        MTHCA_INVAL_LKEY                        = 0x100,
-       MTHCA_TAVOR_MAX_WQES_PER_RECV_DB        = 256
+       MTHCA_TAVOR_MAX_WQES_PER_RECV_DB        = 256,
+       MTHCA_ARBEL_MAX_WQES_PER_SEND_DB        = 255
 };
 
 struct mthca_next_seg {
@@ -112,4 +115,19 @@ struct mthca_mlx_seg {
        __be16 vcrc;
 };
 
+static __always_inline void mthca_set_data_seg(struct mthca_data_seg *dseg,
+                                              struct ib_sge *sg)
+{
+       dseg->byte_count = cpu_to_be32(sg->length);
+       dseg->lkey       = cpu_to_be32(sg->lkey);
+       dseg->addr       = cpu_to_be64(sg->addr);
+}
+
+static __always_inline void mthca_set_data_seg_inval(struct mthca_data_seg *dseg)
+{
+       dseg->byte_count = 0;
+       dseg->lkey       = cpu_to_be32(MTHCA_INVAL_LKEY);
+       dseg->addr       = 0;
+}
+
 #endif /* MTHCA_WQE_H */