summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/switches/idt_gen2.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2011-05-20 18:10:04 +0200
committerRandy Dunlap <randy.dunlap@oracle.com>2011-05-20 18:10:04 +0200
commit2f3e4af471e38e0658e701973238ae4b5e50fcd6 (patch)
treefbfc99c0d975e38ff80f4ff3239a9fc0567b8a4d /drivers/rapidio/switches/idt_gen2.c
parentCorrect occurrences of (diff)
parentCreate Documentation/security/, (diff)
downloadlinux-2f3e4af471e38e0658e701973238ae4b5e50fcd6.tar.xz
linux-2f3e4af471e38e0658e701973238ae4b5e50fcd6.zip
Merge branch 'docs-security' into docs-move
Diffstat (limited to 'drivers/rapidio/switches/idt_gen2.c')
-rw-r--r--drivers/rapidio/switches/idt_gen2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/rapidio/switches/idt_gen2.c b/drivers/rapidio/switches/idt_gen2.c
index ac2701b22e71..043ee3136e40 100644
--- a/drivers/rapidio/switches/idt_gen2.c
+++ b/drivers/rapidio/switches/idt_gen2.c
@@ -95,6 +95,9 @@ idtg2_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
else
table++;
+ if (route_port == RIO_INVALID_ROUTE)
+ route_port = IDT_DEFAULT_ROUTE;
+
rio_mport_write_config_32(mport, destid, hopcount,
LOCAL_RTE_CONF_DESTID_SEL, table);
@@ -411,6 +414,12 @@ static int idtg2_switch_init(struct rio_dev *rdev, int do_enum)
rdev->rswitch->em_handle = idtg2_em_handler;
rdev->rswitch->sw_sysfs = idtg2_sysfs;
+ if (do_enum) {
+ /* Ensure that default routing is disabled on startup */
+ rio_write_config_32(rdev,
+ RIO_STD_RTE_DEFAULT_PORT, IDT_NO_ROUTE);
+ }
+
return 0;
}