aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_provider.h
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-07-07 20:57:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:49 -0400
commit5e0b537c7d94efe3fea0fee8e2533c3231a8af75 (patch)
tree108ecc2bd5c9fabc86f1c51b2e77421cf78ce433 /drivers/infiniband/hw/mthca/mthca_provider.h
parent56483ec1b70221f8c9838ccc9a89b43d9de66993 (diff)
[PATCH] IB uverbs: add mthca user context support
Add support for managing userspace contexts to mthca. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.h')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h
index 4d976cccb1a8..27cd43cadd48 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.h
+++ b/drivers/infiniband/hw/mthca/mthca_provider.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved. 2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Cisco Systems. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU 6 * licenses. You may choose to be licensed under the terms of the GNU
@@ -54,6 +55,14 @@ struct mthca_uar {
54 int index; 55 int index;
55}; 56};
56 57
58struct mthca_user_db_table;
59
60struct mthca_ucontext {
61 struct ib_ucontext ibucontext;
62 struct mthca_uar uar;
63 struct mthca_user_db_table *db_tab;
64};
65
57struct mthca_mtt; 66struct mthca_mtt;
58 67
59struct mthca_mr { 68struct mthca_mr {
@@ -236,6 +245,11 @@ struct mthca_sqp {
236 dma_addr_t header_dma; 245 dma_addr_t header_dma;
237}; 246};
238 247
248static inline struct mthca_ucontext *to_mucontext(struct ib_ucontext *ibucontext)
249{
250 return container_of(ibucontext, struct mthca_ucontext, ibucontext);
251}
252
239static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr) 253static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr)
240{ 254{
241 return container_of(ibmr, struct mthca_fmr, ibmr); 255 return container_of(ibmr, struct mthca_fmr, ibmr);