]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
RDMA/nes: Correct cap.max_inline_data assignment in nes_query_qp()
authorChien Tung <chien.tin.tung@intel.com>
Thu, 25 Mar 2010 13:39:50 +0000 (13:39 +0000)
committerRoland Dreier <rolandd@cisco.com>
Wed, 7 Apr 2010 21:16:08 +0000 (14:16 -0700)
cap.max_inline_data is incorrectly set in init_attr instead of attr.
Set it in attr so subsequent init_attr.cap assignment will get the
correct value.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_verbs.c

index 69928296d74bf3b8f41e5f80449ecc66b4fc6375..36348bf9dee227e7748008f5205b46e4eaedc024 100644 (file)
@@ -2820,11 +2820,10 @@ static int nes_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
        attr->cap.max_send_wr = nesqp->hwqp.sq_size;
        attr->cap.max_recv_wr = nesqp->hwqp.rq_size;
        attr->cap.max_recv_sge = 1;
-       if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
-               init_attr->cap.max_inline_data = 0;
-       } else {
-               init_attr->cap.max_inline_data = 64;
-       }
+       if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA)
+               attr->cap.max_inline_data = 0;
+       else
+               attr->cap.max_inline_data = 64;
 
        init_attr->event_handler = nesqp->ibqp.event_handler;
        init_attr->qp_context = nesqp->ibqp.qp_context;