浏览代码

IB/ipath: iterate over correct number of ports during reset

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Bryan O'Sullivan 19 年之前
父节点
当前提交
23e86a4584
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/infiniband/hw/ipath/ipath_driver.c

+ 1 - 1
drivers/infiniband/hw/ipath/ipath_driver.c

@@ -1959,7 +1959,7 @@ int ipath_reset_device(int unit)
 	}
 	}
 
 
 	if (dd->ipath_pd)
 	if (dd->ipath_pd)
-		for (i = 1; i < dd->ipath_portcnt; i++) {
+		for (i = 1; i < dd->ipath_cfgports; i++) {
 			if (dd->ipath_pd[i] && dd->ipath_pd[i]->port_cnt) {
 			if (dd->ipath_pd[i] && dd->ipath_pd[i]->port_cnt) {
 				ipath_dbg("unit %u port %d is in use "
 				ipath_dbg("unit %u port %d is in use "
 					  "(PID %u cmd %s), can't reset\n",
 					  "(PID %u cmd %s), can't reset\n",