> > diff --git a/drivers/infiniband/core/cma.c > b/drivers/infiniband/core/cma.c > > index 2a6fc47..9e46b42 100644 > > --- a/drivers/infiniband/core/cma.c > > +++ b/drivers/infiniband/core/cma.c > > @@ -684,6 +684,8 @@ static int cma_resolve_ib_dev(struct > > rdma_id_private *id_priv) > > for (i = 0; !ib_get_cached_gid(cur_dev->device, p, i, > > &gid, NULL); > > i++) { > > + struct ib_port_attr attr; > > + > > if (!memcmp(&gid, dgid, sizeof(gid))) { > > cma_dev = cur_dev; > > sgid = gid; > > @@ -692,7 +694,9 @@ static int cma_resolve_ib_dev(struct > > rdma_id_private *id_priv) > > } > > > > if (!cma_dev && (gid.global.subnet_prefix == > > - dgid->global.subnet_prefix)) { > > + dgid->global.subnet_prefix) && > > + (!ib_query_port(cur_dev->device, p, &attr) && > > + attr.state == IB_PORT_ACTIVE)) { I do have a concern about accessing non-cached port data as part of this call. Can we cache the port state and use that instead? ��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f