aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorHal Rosenstock <halr@voltaire.com>2005-07-27 14:45:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:26:12 -0400
commitd2082ee516200095956bd66279be4f62f4a5843d (patch)
treed8e08d2af67730a312e000833971ef281669e32c /drivers/infiniband/core
parent497677ab940e637a41351dca6610bc4320abc8f1 (diff)
[PATCH] IB: Introduce RMPP APIs
Introduce RMPP APIs Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Hal Rosenstock <halr@voltaire.com> Cc: 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/core')
-rw-r--r--drivers/infiniband/core/mad.c4
-rw-r--r--drivers/infiniband/core/sa_query.c20
2 files changed, 3 insertions, 21 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 8216af0ba783..26e2b59ce5a6 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -777,7 +777,7 @@ static int get_buf_length(int hdr_len, int data_len)
777 777
778struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, 778struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
779 u32 remote_qpn, u16 pkey_index, 779 u32 remote_qpn, u16 pkey_index,
780 struct ib_ah *ah, 780 struct ib_ah *ah, int rmpp_active,
781 int hdr_len, int data_len, 781 int hdr_len, int data_len,
782 unsigned int __nocast gfp_mask) 782 unsigned int __nocast gfp_mask)
783{ 783{
@@ -786,6 +786,8 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
786 int buf_size; 786 int buf_size;
787 void *buf; 787 void *buf;
788 788
789 if (rmpp_active)
790 return ERR_PTR(-EINVAL); /* until RMPP implemented */
789 mad_agent_priv = container_of(mad_agent, 791 mad_agent_priv = container_of(mad_agent,
790 struct ib_mad_agent_private, agent); 792 struct ib_mad_agent_private, agent);
791 buf_size = get_buf_length(hdr_len, data_len); 793 buf_size = get_buf_length(hdr_len, data_len);
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index 9ef8fe0163dd..4ec80443702f 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -50,26 +50,6 @@ MODULE_AUTHOR("Roland Dreier");
50MODULE_DESCRIPTION("InfiniBand subnet administration query support"); 50MODULE_DESCRIPTION("InfiniBand subnet administration query support");
51MODULE_LICENSE("Dual BSD/GPL"); 51MODULE_LICENSE("Dual BSD/GPL");
52 52
53/*
54 * These two structures must be packed because they have 64-bit fields
55 * that are only 32-bit aligned. 64-bit architectures will lay them
56 * out wrong otherwise. (And unfortunately they are sent on the wire
57 * so we can't change the layout)
58 */
59struct ib_sa_hdr {
60 u64 sm_key;
61 u16 attr_offset;
62 u16 reserved;
63 ib_sa_comp_mask comp_mask;
64} __attribute__ ((packed));
65
66struct ib_sa_mad {
67 struct ib_mad_hdr mad_hdr;
68 struct ib_rmpp_hdr rmpp_hdr;
69 struct ib_sa_hdr sa_hdr;
70 u8 data[200];
71} __attribute__ ((packed));
72
73struct ib_sa_sm_ah { 53struct ib_sa_sm_ah {
74 struct ib_ah *ah; 54 struct ib_ah *ah;
75 struct kref ref; 55 struct kref ref;