From: Dave Olson Date: Thu, 17 Apr 2008 04:01:12 +0000 (-0700) Subject: IB/ipath: Shared context code needs to be sure device is usable X-Git-Tag: v2.6.26-rc1~1156^2~73 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d1ce03dd335abaef50dc615137cac2a22c5cee0;p=linux-2.6 IB/ipath: Shared context code needs to be sure device is usable The code was checking if units are present, but not that present units were usable (link up, etc.) Signed-off-by: Dave Olson Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 7e025c8e01..219b62d32e 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -1760,7 +1760,7 @@ static int find_shared_port(struct file *fp, for (ndev = 0; ndev < devmax; ndev++) { struct ipath_devdata *dd = ipath_lookup(ndev); - if (!dd) + if (!usable(dd)) continue; for (i = 1; i < dd->ipath_cfgports; i++) { struct ipath_portdata *pd = dd->ipath_pd[i];