diff options
author | Eli Cohen <eli@mellanox.co.il> | 2010-02-08 12:40:37 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-02-24 23:54:10 +0100 |
commit | 920d706c892e8f8cfff95f46aeb95fc6344f0bd5 (patch) | |
tree | a4219e9b0bc285bb080b4239107cf9e391017c66 /drivers/infiniband/hw/mthca | |
parent | RDMA: Use rlimit helpers (diff) | |
download | linux-920d706c892e8f8cfff95f46aeb95fc6344f0bd5.tar.xz linux-920d706c892e8f8cfff95f46aeb95fc6344f0bd5.zip |
IB/core: Fix and clean up ib_ud_header_init()
ib_ud_header_init() first clears header and then fills up the various
fields. Later on, it tests header->immediate_present, which it has
already cleared, so the condition is always false. Fix this by adding
an immediate_present parameter and setting header->immediate_present
as is done with grh_present. Also remove unused calculation of
header_len.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index c10576fa60c1..d2d172e6289c 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -1494,7 +1494,7 @@ static int build_mlx_header(struct mthca_dev *dev, struct mthca_sqp *sqp, u16 pkey; ib_ud_header_init(256, /* assume a MAD */ - mthca_ah_grh_present(to_mah(wr->wr.ud.ah)), + mthca_ah_grh_present(to_mah(wr->wr.ud.ah)), 0, &sqp->ud_header); err = mthca_read_ah(dev, to_mah(wr->wr.ud.ah), &sqp->ud_header); |