[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1287410600-24783-1-git-send-email-alexandre.bounine@idt.com>
Date: Mon, 18 Oct 2010 10:03:19 -0400
From: Alexandre Bounine <alexandre.bounine@....com>
To: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Cc: Alexandre Bounine <alexandre.bounine@....com>,
Kumar Gala <galak@...nel.crashing.org>,
Matt Porter <mporter@...nel.crashing.org>,
Li Yang <leoli@...escale.com>,
Thomas Moll <thomas.moll@...go.com>,
Micha Nelissen <micha@...i.hopto.org>
Subject: [PATCH -mm 1/2] 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@....com>
Cc: Kumar Gala <galak@...nel.crashing.org>
Cc: Matt Porter <mporter@...nel.crashing.org>
Cc: Li Yang <leoli@...escale.com>
Cc: Thomas Moll <thomas.moll@...go.com>
Cc: Micha Nelissen <micha@...i.hopto.org>
---
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 d9e9492..2003fb6 100644
--- 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);
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists