IB/ipath: deref correct pointer when using kernel SMA
authorBryan O'Sullivan <bos@pathscale.com>
Tue, 23 May 2006 18:32:38 +0000 (11:32 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 23 May 2006 20:29:35 +0000 (13:29 -0700)
At this point, the core QP structure hasn't been initialized, so what's
in there isn't valid.  Get the same information elsewhere.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_qp.c

index 0924a21fec13ad447f6ec42c833f5b6cae46b423..9f8855d970c87483d0f16faf358630e4bb73068f 100644 (file)
@@ -734,7 +734,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
                ipath_reset_qp(qp);
 
                /* Tell the core driver that the kernel SMA is present. */
-               if (qp->ibqp.qp_type == IB_QPT_SMI)
+               if (init_attr->qp_type == IB_QPT_SMI)
                        ipath_layer_set_verbs_flags(dev->dd,
                                                    IPATH_VERBS_KERNEL_SMA);
                break;