diff options
author | Hal Rosenstock <halr@voltaire.com> | 2005-07-27 14:45:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:10 -0400 |
commit | df9f9ead746e9607099d7024f312133944173609 (patch) | |
tree | 3a7da0dcfd4a6c916dea2ba736abcd7e7d583998 /drivers/infiniband | |
parent | f68bcc2df8115b4ea45bfa4f8de22ec7232562b5 (diff) |
[PATCH] IB: Add ib_coalesce_recv_mad to MAD
Add implementation for ib_coalesce_recv_mad. Also, clear allocated MAD data
buffer in ib_create_send_mad.
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')
-rw-r--r-- | drivers/infiniband/core/mad.c | 9 | ||||
-rw-r--r-- | drivers/infiniband/include/ib_mad.h | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 9719fa6c14f..430a6ee8987 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -796,9 +796,9 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, | |||
796 | buf = kmalloc(sizeof *send_buf + buf_size, gfp_mask); | 796 | buf = kmalloc(sizeof *send_buf + buf_size, gfp_mask); |
797 | if (!buf) | 797 | if (!buf) |
798 | return ERR_PTR(-ENOMEM); | 798 | return ERR_PTR(-ENOMEM); |
799 | memset(buf, 0, sizeof *send_buf + buf_size); | ||
799 | 800 | ||
800 | send_buf = buf + buf_size; | 801 | send_buf = buf + buf_size; |
801 | memset(send_buf, 0, sizeof *send_buf); | ||
802 | send_buf->mad = buf; | 802 | send_buf->mad = buf; |
803 | 803 | ||
804 | send_buf->sge.addr = dma_map_single(mad_agent->device->dma_device, | 804 | send_buf->sge.addr = dma_map_single(mad_agent->device->dma_device, |
@@ -1021,13 +1021,6 @@ void ib_free_recv_mad(struct ib_mad_recv_wc *mad_recv_wc) | |||
1021 | } | 1021 | } |
1022 | EXPORT_SYMBOL(ib_free_recv_mad); | 1022 | EXPORT_SYMBOL(ib_free_recv_mad); |
1023 | 1023 | ||
1024 | void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc, | ||
1025 | void *buf) | ||
1026 | { | ||
1027 | printk(KERN_ERR PFX "ib_coalesce_recv_mad() not implemented yet\n"); | ||
1028 | } | ||
1029 | EXPORT_SYMBOL(ib_coalesce_recv_mad); | ||
1030 | |||
1031 | struct ib_mad_agent *ib_redirect_mad_qp(struct ib_qp *qp, | 1024 | struct ib_mad_agent *ib_redirect_mad_qp(struct ib_qp *qp, |
1032 | u8 rmpp_version, | 1025 | u8 rmpp_version, |
1033 | ib_mad_send_handler send_handler, | 1026 | ib_mad_send_handler send_handler, |
diff --git a/drivers/infiniband/include/ib_mad.h b/drivers/infiniband/include/ib_mad.h index a6f06b8c4ac..e8a122122cb 100644 --- a/drivers/infiniband/include/ib_mad.h +++ b/drivers/infiniband/include/ib_mad.h | |||
@@ -365,8 +365,7 @@ int ib_post_send_mad(struct ib_mad_agent *mad_agent, | |||
365 | * This call copies a chain of received RMPP MADs into a single data buffer, | 365 | * This call copies a chain of received RMPP MADs into a single data buffer, |
366 | * removing duplicated headers. | 366 | * removing duplicated headers. |
367 | */ | 367 | */ |
368 | void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc, | 368 | void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc, void *buf); |
369 | void *buf); | ||
370 | 369 | ||
371 | /** | 370 | /** |
372 | * ib_free_recv_mad - Returns data buffers used to receive a MAD to the | 371 | * ib_free_recv_mad - Returns data buffers used to receive a MAD to the |