Skip to content

Commit

Permalink
rapidio: fix maximum port number in tsi57x EM initialization
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Alexandre Bounine authored and torvalds committed Oct 28, 2010
1 parent 388c45c commit 2d4da0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/rapidio/switches/tsi57x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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), &regval);
Expand Down

0 comments on commit 2d4da0f

Please sign in to comment.