summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/switches/tsi57x.c
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2011-05-17 15:44:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-18 02:55:22 -0700
commit0bf2461fdd9008290cf429e50e4f362dafab4249 (patch)
tree03e3ef8e7c55c86e428cbe9cb72af3b95c77035b /drivers/rapidio/switches/tsi57x.c
parenta085963a2757b9ab0a7ec1cf4a14aa85935c1e2a (diff)
downloadop-kernel-dev-0bf2461fdd9008290cf429e50e4f362dafab4249.zip
op-kernel-dev-0bf2461fdd9008290cf429e50e4f362dafab4249.tar.gz
rapidio: fix default routing initialization
Fix switch initialization to ensure that all switches have default routing disabled. This guarantees that no unexpected RapidIO packets arrive to the default port set by reset and there is no default routing destination until it is properly configured by software. This update also unifies handling of unmapped destinations by tsi57x, IDT Gen1 and IDT Gen2 switches. 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: <stable@kernel.org> [2.6.37+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/switches/tsi57x.c')
-rw-r--r--drivers/rapidio/switches/tsi57x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/rapidio/switches/tsi57x.c b/drivers/rapidio/switches/tsi57x.c
index 1a62934..db8b802 100644
--- a/drivers/rapidio/switches/tsi57x.c
+++ b/drivers/rapidio/switches/tsi57x.c
@@ -303,6 +303,12 @@ static int tsi57x_switch_init(struct rio_dev *rdev, int do_enum)
rdev->rswitch->em_init = tsi57x_em_init;
rdev->rswitch->em_handle = tsi57x_em_handler;
+ if (do_enum) {
+ /* Ensure that default routing is disabled on startup */
+ rio_write_config_32(rdev, RIO_STD_RTE_DEFAULT_PORT,
+ RIO_INVALID_ROUTE);
+ }
+
return 0;
}
OpenPOWER on IntegriCloud