]> err.no Git - linux-2.6/commitdiff
[PATCH] IB: Add ib_coalesce_recv_mad to MAD
authorHal Rosenstock <halr@voltaire.com>
Wed, 27 Jul 2005 18:45:28 +0000 (11:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:26:10 +0000 (16:26 -0700)
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>
drivers/infiniband/core/mad.c
drivers/infiniband/include/ib_mad.h

index 9719fa6c14f7c5ae5ddf01f825e494016aaf975f..430a6ee898778f25f48c824cac5a9b36e731121c 100644 (file)
@@ -796,9 +796,9 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
        buf = kmalloc(sizeof *send_buf + buf_size, gfp_mask);
        if (!buf)
                return ERR_PTR(-ENOMEM);
+       memset(buf, 0, sizeof *send_buf + buf_size);
 
        send_buf = buf + buf_size;
-       memset(send_buf, 0, sizeof *send_buf);
        send_buf->mad = buf;
 
        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)
 }
 EXPORT_SYMBOL(ib_free_recv_mad);
 
-void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc,
-                         void *buf)
-{
-       printk(KERN_ERR PFX "ib_coalesce_recv_mad() not implemented yet\n");
-}
-EXPORT_SYMBOL(ib_coalesce_recv_mad);
-
 struct ib_mad_agent *ib_redirect_mad_qp(struct ib_qp *qp,
                                        u8 rmpp_version,
                                        ib_mad_send_handler send_handler,
index a6f06b8c4acf942c39fb0b5a603de9f37b26301f..e8a122122cba9a1cd1c11d6e2f50063049b2424d 100644 (file)
@@ -365,8 +365,7 @@ int ib_post_send_mad(struct ib_mad_agent *mad_agent,
  * This call copies a chain of received RMPP MADs into a single data buffer,
  * removing duplicated headers.
  */
-void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc,
-                         void *buf);
+void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc, void *buf);
 
 /**
  * ib_free_recv_mad - Returns data buffers used to receive a MAD to the