[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>
This commit is contained in:
committed by
Paul Mackerras
parent
cc2bb6968a
commit
e042323607
@ -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 +=
|
||||
|
Reference in New Issue
Block a user