Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=614c3c85b5b4c3776439d464939c123cce679dee
Commit:     614c3c85b5b4c3776439d464939c123cce679dee
Parent:     99f9f3d49cbc7d944476f6fde53a77ec789ab2aa
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Tue Jun 12 10:50:42 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Jun 12 10:50:42 2007 -0700

    IB/mlx4: Fix handling of wq->tail for send completions
    
    Cast the increment added to wq->tail when send completions are
    processed to u16 to avoid using wrong values caused by standard
    integer promotions.
    
    The same bug was fixed in libmlx4 by Eli Cohen <[EMAIL PROTECTED]>.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mlx4/cq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index b2a290c..048c527 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -354,7 +354,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
        if (is_send) {
                wq = &(*cur_qp)->sq;
                wqe_ctr = be16_to_cpu(cqe->wqe_index);
-               wq->tail += wqe_ctr - (u16) wq->tail;
+               wq->tail += (u16) (wqe_ctr - (u16) wq->tail);
                wc->wr_id = wq->wrid[wq->tail & (wq->max - 1)];
                ++wq->tail;
        } else if ((*cur_qp)->ibqp.srq) {
-
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