Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux-2.6-block.git] / drivers / infiniband / core / sa_query.c
index b5656a2298ee0b1aa88f0cf50672f533b0a0fb6e..8a09c0fb268d8d89529f0f22249422ee3fe05320 100644 (file)
@@ -885,6 +885,11 @@ static void update_sm_ah(struct work_struct *work)
        ah_attr.dlid     = port_attr.sm_lid;
        ah_attr.sl       = port_attr.sm_sl;
        ah_attr.port_num = port->port_num;
+       if (port_attr.grh_required) {
+               ah_attr.ah_flags = IB_AH_GRH;
+               ah_attr.grh.dgid.global.subnet_prefix = cpu_to_be64(port_attr.subnet_prefix);
+               ah_attr.grh.dgid.global.interface_id = cpu_to_be64(IB_SA_WELL_KNOWN_GUID);
+       }
 
        new_ah->ah = ib_create_ah(port->agent->qp->pd, &ah_attr);
        if (IS_ERR(new_ah->ah)) {