]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/hw/mthca/mthca_provider.h
Merge with /shiny/git/linux-2.6/.git
[karo-tx-linux.git] / drivers / infiniband / hw / mthca / mthca_provider.h
index 4d976cccb1a8126acd97096821d92808b698a114..1d032791cc8b67a3ad217dc3a235ead72dab1f6b 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2005 Cisco Systems.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -54,6 +55,14 @@ struct mthca_uar {
        int           index;
 };
 
+struct mthca_user_db_table;
+
+struct mthca_ucontext {
+       struct ib_ucontext          ibucontext;
+       struct mthca_uar            uar;
+       struct mthca_user_db_table *db_tab;
+};
+
 struct mthca_mtt;
 
 struct mthca_mr {
@@ -83,6 +92,7 @@ struct mthca_pd {
        u32             pd_num;
        atomic_t        sqp_count;
        struct mthca_mr ntmr;
+       int             privileged;
 };
 
 struct mthca_eq {
@@ -167,6 +177,7 @@ struct mthca_cq {
        int                    cqn;
        u32                    cons_index;
        int                    is_direct;
+       int                    is_kernel;
 
        /* Next fields are Arbel only */
        int                    set_ci_db_index;
@@ -236,6 +247,11 @@ struct mthca_sqp {
        dma_addr_t      header_dma;
 };
 
+static inline struct mthca_ucontext *to_mucontext(struct ib_ucontext *ibucontext)
+{
+       return container_of(ibucontext, struct mthca_ucontext, ibucontext);
+}
+
 static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr)
 {
        return container_of(ibmr, struct mthca_fmr, ibmr);