]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ipath: Shared context code needs to be sure device is usable
authorDave Olson <dave.olson@qlogic.com>
Thu, 17 Apr 2008 04:01:12 +0000 (21:01 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 17 Apr 2008 04:01:12 +0000 (21:01 -0700)
The code was checking if units are present, but not that present units
were usable (link up, etc.)

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_file_ops.c

index 7e025c8e01b6d9d1efe6bc0e787061159b1b1380..219b62d32eed4fb1bba93d2cee9f71e08befb22a 100644 (file)
@@ -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];