diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2010-10-27 18:34:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:16 -0400 |
commit | 2d4da0fc0940625d59f014c3f85370f9b60ba7f4 (patch) | |
tree | 2e520a2c5697e5afd5d1d09e2562c8826e96f6a2 /drivers/rapidio | |
parent | 388c45ccfaeec68e334ad79edeb0b5b0a43197ff (diff) |
rapidio: fix maximum port number in tsi57x EM initialization
Replace hardcoded maximum port number with actual reported number of
switch ports.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Thomas Moll <thomas.moll@sysgo.com>
Cc: Micha Nelissen <micha@neli.hopto.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio')
-rw-r--r-- | drivers/rapidio/switches/tsi57x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rapidio/switches/tsi57x.c b/drivers/rapidio/switches/tsi57x.c index d9e94920e8b0..2003fb63c404 100644 --- a/drivers/rapidio/switches/tsi57x.c +++ b/drivers/rapidio/switches/tsi57x.c | |||
@@ -166,7 +166,8 @@ tsi57x_em_init(struct rio_dev *rdev) | |||
166 | 166 | ||
167 | pr_debug("TSI578 %s [%d:%d]\n", __func__, destid, hopcount); | 167 | pr_debug("TSI578 %s [%d:%d]\n", __func__, destid, hopcount); |
168 | 168 | ||
169 | for (portnum = 0; portnum < 16; portnum++) { | 169 | for (portnum = 0; |
170 | portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) { | ||
170 | /* Make sure that Port-Writes are enabled (for all ports) */ | 171 | /* Make sure that Port-Writes are enabled (for all ports) */ |
171 | rio_mport_read_config_32(mport, destid, hopcount, | 172 | rio_mport_read_config_32(mport, destid, hopcount, |
172 | TSI578_SP_MODE(portnum), ®val); | 173 | TSI578_SP_MODE(portnum), ®val); |