aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rapidio/rio-scan.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 45d14cd6b356..e655756e1185 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -947,7 +947,7 @@ static int rio_enum_complete(struct rio_mport *port)
947 */ 947 */
948static int __devinit 948static int __devinit
949rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid, 949rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid,
950 u8 hopcount) 950 u8 hopcount, struct rio_dev *prev, int prev_port)
951{ 951{
952 u8 port_num, route_port; 952 u8 port_num, route_port;
953 struct rio_dev *rdev; 953 struct rio_dev *rdev;
@@ -957,6 +957,9 @@ rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid,
957 if ((rdev = rio_setup_device(net, port, destid, hopcount, 0))) { 957 if ((rdev = rio_setup_device(net, port, destid, hopcount, 0))) {
958 /* Add device to the global and bus/net specific list. */ 958 /* Add device to the global and bus/net specific list. */
959 list_add_tail(&rdev->net_list, &net->devices); 959 list_add_tail(&rdev->net_list, &net->devices);
960 rdev->prev = prev;
961 if (prev && rio_is_switch(prev))
962 prev->rswitch->nextdev[prev_port] = rdev;
960 } else 963 } else
961 return -1; 964 return -1;
962 965
@@ -998,8 +1001,8 @@ rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid,
998 if (ndestid == RIO_ANY_DESTID(port->sys_size)) 1001 if (ndestid == RIO_ANY_DESTID(port->sys_size))
999 continue; 1002 continue;
1000 rio_unlock_device(port, destid, hopcount); 1003 rio_unlock_device(port, destid, hopcount);
1001 if (rio_disc_peer 1004 if (rio_disc_peer(net, port, ndestid,
1002 (net, port, ndestid, hopcount + 1) < 0) 1005 hopcount + 1, rdev, port_num) < 0)
1003 return -1; 1006 return -1;
1004 } 1007 }
1005 } 1008 }
@@ -1291,7 +1294,7 @@ int __devinit rio_disc_mport(struct rio_mport *mport)
1291 mport->host_deviceid); 1294 mport->host_deviceid);
1292 1295
1293 if (rio_disc_peer(net, mport, RIO_ANY_DESTID(mport->sys_size), 1296 if (rio_disc_peer(net, mport, RIO_ANY_DESTID(mport->sys_size),
1294 0) < 0) { 1297 0, NULL, 0) < 0) {
1295 printk(KERN_INFO 1298 printk(KERN_INFO
1296 "RIO: master port %d device has failed discovery\n", 1299 "RIO: master port %d device has failed discovery\n",
1297 mport->id); 1300 mport->id);