git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 2.0 rc7
[linux-2.6.git]
/
drivers
/
infiniband
/
hw
/
mthca
/
mthca_provider.h
diff --git
a/drivers/infiniband/hw/mthca/mthca_provider.h
b/drivers/infiniband/hw/mthca/mthca_provider.h
index
5c94df3
..
619710f
100644
(file)
--- a/
drivers/infiniband/hw/mthca/mthca_provider.h
+++ b/
drivers/infiniband/hw/mthca/mthca_provider.h
@@
-49,12
+49,35
@@
struct mthca_buf_list {
DECLARE_PCI_UNMAP_ADDR(mapping)
};
DECLARE_PCI_UNMAP_ADDR(mapping)
};
+struct mthca_uar {
+ unsigned long pfn;
+ int index;
+};
+
struct mthca_mr {
struct ib_mr ibmr;
int order;
u32 first_seg;
};
struct mthca_mr {
struct ib_mr ibmr;
int order;
u32 first_seg;
};
+struct mthca_fmr {
+ struct ib_fmr ibmr;
+ struct ib_fmr_attr attr;
+ int order;
+ u32 first_seg;
+ int maps;
+ union {
+ struct {
+ struct mthca_mpt_entry __iomem *mpt;
+ u64 __iomem *mtts;
+ } tavor;
+ struct {
+ struct mthca_mpt_entry *mpt;
+ __be64 *mtts;
+ } arbel;
+ } mem;
+};
+
struct mthca_pd {
struct ib_pd ibpd;
u32 pd_num;
struct mthca_pd {
struct ib_pd ibpd;
u32 pd_num;
@@
-65,7
+88,7
@@
struct mthca_pd {
struct mthca_eq {
struct mthca_dev *dev;
int eqn;
struct mthca_eq {
struct mthca_dev *dev;
int eqn;
- u32 e
cr
_mask;
+ u32 e
qn
_mask;
u32 cons_index;
u16 msi_x_vector;
u16 msi_x_entry;
u32 cons_index;
u16 msi_x_vector;
u16 msi_x_entry;
@@
-77,12
+100,18
@@
struct mthca_eq {
struct mthca_av;
struct mthca_av;
+enum mthca_ah_type {
+ MTHCA_AH_ON_HCA,
+ MTHCA_AH_PCI_POOL,
+ MTHCA_AH_KMALLOC
+};
+
struct mthca_ah {
struct mthca_ah {
- struct ib_ah ibah;
-
int on_hca
;
- u32 key;
- struct mthca_av *av;
- dma_addr_t avdma;
+ struct ib_ah
ibah;
+
enum mthca_ah_type type
;
+ u32
key;
+ struct mthca_av
*av;
+ dma_addr_t
avdma;
};
/*
};
/*
@@
-136,8
+165,16
@@
struct mthca_cq {
spinlock_t lock;
atomic_t refcount;
int cqn;
spinlock_t lock;
atomic_t refcount;
int cqn;
-
int
cons_index;
+
u32
cons_index;
int is_direct;
int is_direct;
+
+ /* Next fields are Arbel only */
+ int set_ci_db_index;
+ u32 *set_ci_db;
+ int arm_db_index;
+ u32 *arm_db;
+ int arm_sn;
+
union {
struct mthca_buf_list direct;
struct mthca_buf_list *page_list;
union {
struct mthca_buf_list direct;
struct mthca_buf_list *page_list;
@@
-147,19
+184,22
@@
struct mthca_cq {
};
struct mthca_wq {
};
struct mthca_wq {
- int max;
- int cur;
- int next;
- int last_comp;
- void *last;
- int max_gs;
- int wqe_shift;
- enum ib_sig_type policy;
+ spinlock_t lock;
+ int max;
+ unsigned next_ind;
+ unsigned last_comp;
+ unsigned head;
+ unsigned tail;
+ void *last;
+ int max_gs;
+ int wqe_shift;
+
+ int db_index; /* Arbel only */
+ u32 *db;
};
struct mthca_qp {
struct ib_qp ibqp;
};
struct mthca_qp {
struct ib_qp ibqp;
- spinlock_t lock;
atomic_t refcount;
u32 qpn;
int is_direct;
atomic_t refcount;
u32 qpn;
int is_direct;
@@
-172,6
+212,7
@@
struct mthca_qp {
struct mthca_wq rq;
struct mthca_wq sq;
struct mthca_wq rq;
struct mthca_wq sq;
+ enum ib_sig_type sq_policy;
int send_wqe_offset;
u64 *wrid;
int send_wqe_offset;
u64 *wrid;
@@
-195,6
+236,11
@@
struct mthca_sqp {
dma_addr_t header_dma;
};
dma_addr_t header_dma;
};
+static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr)
+{
+ return container_of(ibmr, struct mthca_fmr, ibmr);
+}
+
static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr)
{
return container_of(ibmr, struct mthca_mr, ibmr);
static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr)
{
return container_of(ibmr, struct mthca_mr, ibmr);