aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2010-05-26 17:44:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 12:12:51 -0400
commit679395fdaa68de39aaf2ddf7298b504fed9622d3 (patch)
tree86239253b766027f88a7675216704db31caa1f7b /drivers/rapidio
parent7a88d6286240f1e8a0cf9c07252e1576169020f5 (diff)
rapidio: use default route value for CPS switches
Fix to use correct default value for routing table entries. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Thomas Moll <thomas.moll@sysgo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio')
-rw-r--r--drivers/rapidio/switches/idtcps.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/rapidio/switches/idtcps.c b/drivers/rapidio/switches/idtcps.c
index 73c3677e5ac6..2c790c144f89 100644
--- a/drivers/rapidio/switches/idtcps.c
+++ b/drivers/rapidio/switches/idtcps.c
@@ -15,7 +15,8 @@
15#include <linux/rio_ids.h> 15#include <linux/rio_ids.h>
16#include "../rio.h" 16#include "../rio.h"
17 17
18#define CPS_NO_ROUTE 0xdf 18#define CPS_DEFAULT_ROUTE 0xde
19#define CPS_NO_ROUTE 0xdf
19 20
20#define IDTCPS_RIO_DOMAIN 0xf20020 21#define IDTCPS_RIO_DOMAIN 0xf20020
21 22
@@ -53,10 +54,11 @@ idtcps_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
53 rio_mport_read_config_32(mport, destid, hopcount, 54 rio_mport_read_config_32(mport, destid, hopcount,
54 RIO_STD_RTE_CONF_PORT_SEL_CSR, &result); 55 RIO_STD_RTE_CONF_PORT_SEL_CSR, &result);
55 56
56 if (CPS_NO_ROUTE == (u8)result) 57 if (CPS_DEFAULT_ROUTE == (u8)result ||
57 result = RIO_INVALID_ROUTE; 58 CPS_NO_ROUTE == (u8)result)
58 59 *route_port = RIO_INVALID_ROUTE;
59 *route_port = (u8)result; 60 else
61 *route_port = (u8)result;
60 } 62 }
61 63
62 return 0; 64 return 0;
@@ -74,9 +76,9 @@ idtcps_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount,
74 RIO_STD_RTE_CONF_DESTID_SEL_CSR, i); 76 RIO_STD_RTE_CONF_DESTID_SEL_CSR, i);
75 rio_mport_write_config_32(mport, destid, hopcount, 77 rio_mport_write_config_32(mport, destid, hopcount,
76 RIO_STD_RTE_CONF_PORT_SEL_CSR, 78 RIO_STD_RTE_CONF_PORT_SEL_CSR,
77 (RIO_INVALID_ROUTE << 24) | 79 (CPS_DEFAULT_ROUTE << 24) |
78 (RIO_INVALID_ROUTE << 16) | 80 (CPS_DEFAULT_ROUTE << 16) |
79 (RIO_INVALID_ROUTE << 8) | RIO_INVALID_ROUTE); 81 (CPS_DEFAULT_ROUTE << 8) | CPS_DEFAULT_ROUTE);
80 i += 4; 82 i += 4;
81 } 83 }
82 } 84 }