Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198812
b: refs/heads/master
c: 679395f
h: refs/heads/master
v: v3
  • Loading branch information
Alexandre Bounine authored and Linus Torvalds committed May 27, 2010
1 parent 26240ff commit 1ce42cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a88d6286240f1e8a0cf9c07252e1576169020f5
refs/heads/master: 679395fdaa68de39aaf2ddf7298b504fed9622d3
18 changes: 10 additions & 8 deletions trunk/drivers/rapidio/switches/idtcps.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include <linux/rio_ids.h>
#include "../rio.h"

#define CPS_NO_ROUTE 0xdf
#define CPS_DEFAULT_ROUTE 0xde
#define CPS_NO_ROUTE 0xdf

#define IDTCPS_RIO_DOMAIN 0xf20020

Expand Down Expand Up @@ -53,10 +54,11 @@ idtcps_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
rio_mport_read_config_32(mport, destid, hopcount,
RIO_STD_RTE_CONF_PORT_SEL_CSR, &result);

if (CPS_NO_ROUTE == (u8)result)
result = RIO_INVALID_ROUTE;

*route_port = (u8)result;
if (CPS_DEFAULT_ROUTE == (u8)result ||
CPS_NO_ROUTE == (u8)result)
*route_port = RIO_INVALID_ROUTE;
else
*route_port = (u8)result;
}

return 0;
Expand All @@ -74,9 +76,9 @@ idtcps_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount,
RIO_STD_RTE_CONF_DESTID_SEL_CSR, i);
rio_mport_write_config_32(mport, destid, hopcount,
RIO_STD_RTE_CONF_PORT_SEL_CSR,
(RIO_INVALID_ROUTE << 24) |
(RIO_INVALID_ROUTE << 16) |
(RIO_INVALID_ROUTE << 8) | RIO_INVALID_ROUTE);
(CPS_DEFAULT_ROUTE << 24) |
(CPS_DEFAULT_ROUTE << 16) |
(CPS_DEFAULT_ROUTE << 8) | CPS_DEFAULT_ROUTE);
i += 4;
}
}
Expand Down

0 comments on commit 1ce42cf

Please sign in to comment.