projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
388c45c
)
rapidio: fix maximum port number in tsi57x EM initialization
author
Alexandre Bounine
<
[email protected]
>
Wed, 27 Oct 2010 22:34:35 +0000
(15:34 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 28 Oct 2010 01:03:16 +0000
(18:03 -0700)
Replace hardcoded maximum port number with actual reported number of
switch ports.
Signed-off-by: Alexandre Bounine <
[email protected]
>
Cc: Kumar Gala <
[email protected]
>
Cc: Matt Porter <
[email protected]
>
Cc: Li Yang <
[email protected]
>
Cc: Thomas Moll <
[email protected]
>
Cc: Micha Nelissen <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rapidio/switches/tsi57x.c
patch
|
blob
|
history
diff --git
a/drivers/rapidio/switches/tsi57x.c
b/drivers/rapidio/switches/tsi57x.c
index d9e94920e8b039de06df354ce893f28f49cdae59..2003fb63c404ed9839da7e4167bfb66a7153ca3f 100644
(file)
--- a/
drivers/rapidio/switches/tsi57x.c
+++ b/
drivers/rapidio/switches/tsi57x.c
@@
-166,7
+166,8
@@
tsi57x_em_init(struct rio_dev *rdev)
pr_debug("TSI578 %s [%d:%d]\n", __func__, destid, hopcount);
- for (portnum = 0; portnum < 16; portnum++) {
+ for (portnum = 0;
+ portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) {
/* Make sure that Port-Writes are enabled (for all ports) */
rio_mport_read_config_32(mport, destid, hopcount,
TSI578_SP_MODE(portnum), ®val);