aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio
diff options
context:
space:
mode:
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 }