summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio-sysfs.c
diff options
context:
space:
mode:
authorZhang Wei <wei.zhang@freescale.com>2008-04-18 13:33:42 -0700
committerPaul Mackerras <paulus@samba.org>2008-04-29 19:40:28 +1000
commite042323607f5c14844b1c59aebbca8d1251c7d89 (patch)
tree10c9eac3d5146f3611af9220740e4ec27bf2ade0 /drivers/rapidio/rio-sysfs.c
parentcc2bb6968a2c842149d285d77cb35200d2d37b15 (diff)
downloadop-kernel-dev-e042323607f5c14844b1c59aebbca8d1251c7d89.zip
op-kernel-dev-e042323607f5c14844b1c59aebbca8d1251c7d89.tar.gz
[RAPIDIO] Auto-probe the RapidIO system size
The RapidIO system size will auto probe in RIO setup. The route table and rionet_active in rionet.c are changed to be allocated dynamically according to the size of the system. Signed-off-by: Zhang Wei <wei.zhang@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/rapidio/rio-sysfs.c')
-rw-r--r--drivers/rapidio/rio-sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c
index 659e311..97a147f 100644
--- a/drivers/rapidio/rio-sysfs.c
+++ b/drivers/rapidio/rio-sysfs.c
@@ -43,7 +43,8 @@ static ssize_t routes_show(struct device *dev, struct device_attribute *attr, ch
if (!rdev->rswitch)
goto out;
- for (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) {
+ for (i = 0; i < RIO_MAX_ROUTE_ENTRIES(rdev->net->hport->sys_size);
+ i++) {
if (rdev->rswitch->route_table[i] == RIO_INVALID_ROUTE)
continue;
str +=
OpenPOWER on IntegriCloud