aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_verbs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.h')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h
index 1a24c6a4a814..619ad728b07b 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.h
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.h
@@ -42,6 +42,8 @@
42#include <rdma/ib_pack.h> 42#include <rdma/ib_pack.h>
43#include <rdma/ib_user_verbs.h> 43#include <rdma/ib_user_verbs.h>
44 44
45#include "ipath_kernel.h"
46
45#define IPATH_MAX_RDMA_ATOMIC 4 47#define IPATH_MAX_RDMA_ATOMIC 4
46 48
47#define QPN_MAX (1 << 24) 49#define QPN_MAX (1 << 24)
@@ -59,6 +61,7 @@
59 */ 61 */
60#define IB_CQ_NONE (IB_CQ_NEXT_COMP + 1) 62#define IB_CQ_NONE (IB_CQ_NEXT_COMP + 1)
61 63
64/* AETH NAK opcode values */
62#define IB_RNR_NAK 0x20 65#define IB_RNR_NAK 0x20
63#define IB_NAK_PSN_ERROR 0x60 66#define IB_NAK_PSN_ERROR 0x60
64#define IB_NAK_INVALID_REQUEST 0x61 67#define IB_NAK_INVALID_REQUEST 0x61
@@ -66,6 +69,7 @@
66#define IB_NAK_REMOTE_OPERATIONAL_ERROR 0x63 69#define IB_NAK_REMOTE_OPERATIONAL_ERROR 0x63
67#define IB_NAK_INVALID_RD_REQUEST 0x64 70#define IB_NAK_INVALID_RD_REQUEST 0x64
68 71
72/* Flags for checking QP state (see ib_ipath_state_ops[]) */
69#define IPATH_POST_SEND_OK 0x01 73#define IPATH_POST_SEND_OK 0x01
70#define IPATH_POST_RECV_OK 0x02 74#define IPATH_POST_RECV_OK 0x02
71#define IPATH_PROCESS_RECV_OK 0x04 75#define IPATH_PROCESS_RECV_OK 0x04
@@ -239,7 +243,7 @@ struct ipath_mregion {
239 */ 243 */
240struct ipath_sge { 244struct ipath_sge {
241 struct ipath_mregion *mr; 245 struct ipath_mregion *mr;
242 void *vaddr; /* current pointer into the segment */ 246 void *vaddr; /* kernel virtual address of segment */
243 u32 sge_length; /* length of the SGE */ 247 u32 sge_length; /* length of the SGE */
244 u32 length; /* remaining length of the segment */ 248 u32 length; /* remaining length of the segment */
245 u16 m; /* current index: mr->map[m] */ 249 u16 m; /* current index: mr->map[m] */
@@ -407,6 +411,7 @@ struct ipath_qp {
407 u32 s_ssn; /* SSN of tail entry */ 411 u32 s_ssn; /* SSN of tail entry */
408 u32 s_lsn; /* limit sequence number (credit) */ 412 u32 s_lsn; /* limit sequence number (credit) */
409 struct ipath_swqe *s_wq; /* send work queue */ 413 struct ipath_swqe *s_wq; /* send work queue */
414 struct ipath_swqe *s_wqe;
410 struct ipath_rq r_rq; /* receive work queue */ 415 struct ipath_rq r_rq; /* receive work queue */
411 struct ipath_sge r_sg_list[0]; /* verified SGEs */ 416 struct ipath_sge r_sg_list[0]; /* verified SGEs */
412}; 417};
@@ -683,8 +688,8 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc);
683 688
684void ipath_get_credit(struct ipath_qp *qp, u32 aeth); 689void ipath_get_credit(struct ipath_qp *qp, u32 aeth);
685 690
686int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, 691int ipath_verbs_send(struct ipath_qp *qp, struct ipath_ib_header *hdr,
687 u32 *hdr, u32 len, struct ipath_sge_state *ss); 692 u32 hdrwords, struct ipath_sge_state *ss, u32 len);
688 693
689void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig); 694void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig);
690 695
@@ -692,8 +697,6 @@ void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length);
692 697
693void ipath_skip_sge(struct ipath_sge_state *ss, u32 length); 698void ipath_skip_sge(struct ipath_sge_state *ss, u32 length);
694 699
695int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr);
696
697void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, 700void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
698 int has_grh, void *data, u32 tlen, struct ipath_qp *qp); 701 int has_grh, void *data, u32 tlen, struct ipath_qp *qp);
699 702
@@ -733,6 +736,8 @@ int ipath_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr);
733 736
734int ipath_destroy_srq(struct ib_srq *ibsrq); 737int ipath_destroy_srq(struct ib_srq *ibsrq);
735 738
739void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig);
740
736int ipath_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry); 741int ipath_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry);
737 742
738struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, int comp_vector, 743struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, int comp_vector,
@@ -782,18 +787,28 @@ int ipath_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
782 787
783void ipath_insert_rnr_queue(struct ipath_qp *qp); 788void ipath_insert_rnr_queue(struct ipath_qp *qp);
784 789
790int ipath_init_sge(struct ipath_qp *qp, struct ipath_rwqe *wqe,
791 u32 *lengthp, struct ipath_sge_state *ss);
792
785int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only); 793int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only);
786 794
787u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr, 795u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr,
788 struct ib_global_route *grh, u32 hwords, u32 nwords); 796 struct ib_global_route *grh, u32 hwords, u32 nwords);
789 797
790void ipath_do_ruc_send(unsigned long data); 798void ipath_make_ruc_header(struct ipath_ibdev *dev, struct ipath_qp *qp,
799 struct ipath_other_headers *ohdr,
800 u32 bth0, u32 bth2);
801
802void ipath_do_send(unsigned long data);
803
804void ipath_send_complete(struct ipath_qp *qp, struct ipath_swqe *wqe,
805 enum ib_wc_status status);
806
807int ipath_make_rc_req(struct ipath_qp *qp);
791 808
792int ipath_make_rc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, 809int ipath_make_uc_req(struct ipath_qp *qp);
793 u32 pmtu, u32 *bth0p, u32 *bth2p);
794 810
795int ipath_make_uc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, 811int ipath_make_ud_req(struct ipath_qp *qp);
796 u32 pmtu, u32 *bth0p, u32 *bth2p);
797 812
798int ipath_register_ib_device(struct ipath_devdata *); 813int ipath_register_ib_device(struct ipath_devdata *);
799 814