Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54e95f8dcbd7d86f79b423e8d11053ec9a2d9946
Commit:     54e95f8dcbd7d86f79b423e8d11053ec9a2d9946
Parent:     0e6e74162164d908edf7889ac66dca09e7505745
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 18 08:13:53 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Jun 18 08:13:53 2007 -0700

    IB/mlx4: Get rid of max_inline_data calculation
    
    The calculation of max_inline_data in set_kernel_sq_size() is bogus,
    since it doesn't take into account the fact that inline segments may
    not cross a 64-byte boundary, and hence multiple inline segments will
    probably need to be used to post large inline sends.
    
    We don't support inline sends for kernel QPs anyway, so there's no
    point in doing this calculation anyway, since the field is just zeroed
    out a little later.  So just delete the bogus calculation.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mlx4/qp.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 8fabe0d..95d4a9d 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -277,8 +277,8 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, 
struct ib_qp_cap *cap,
 
        cap->max_send_wr  = qp->sq.max_post = qp->sq.wqe_cnt - 
qp->sq_spare_wqes;
        cap->max_send_sge = qp->sq.max_gs;
-       cap->max_inline_data = (1 << qp->sq.wqe_shift) - 
send_wqe_overhead(type) -
-               sizeof (struct mlx4_wqe_inline_seg);
+       /* We don't support inline sends for kernel QPs (yet) */
+       cap->max_inline_data = 0;
 
        return 0;
 }
@@ -390,9 +390,6 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct 
ib_pd *pd,
                        err = -ENOMEM;
                        goto err_wrid;
                }
-
-               /* We don't support inline sends for kernel QPs (yet) */
-               init_attr->cap.max_inline_data = 0;
        }
 
        err = mlx4_qp_alloc(dev->dev, sqpn, &qp->mqp);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to