Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218602
b: refs/heads/master
c: 1548bf3
h: refs/heads/master
v: v3
  • Loading branch information
Alexandre Bounine authored and Linus Torvalds committed Oct 28, 2010
1 parent 01a630b commit 81d30f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: 2d4da0fc0940625d59f014c3f85370f9b60ba7f4
refs/heads/master: 1548bf316f18090576f611c7318447c512ddbdd2
15 changes: 10 additions & 5 deletions trunk/drivers/rapidio/switches/tsi568.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define SPP_ROUTE_CFG_DESTID(n) (0x11070 + 0x100*n)
#define SPP_ROUTE_CFG_PORT(n) (0x11074 + 0x100*n)

#define TSI568_SP_MODE_BC 0x10004
#define TSI568_SP_MODE(n) (0x11004 + 0x100*n)
#define TSI568_SP_MODE_PW_DIS 0x08000000

static int
Expand Down Expand Up @@ -117,14 +117,19 @@ tsi568_em_init(struct rio_dev *rdev)
u16 destid = rdev->rswitch->destid;
u8 hopcount = rdev->rswitch->hopcount;
u32 regval;
int portnum;

pr_debug("TSI568 %s [%d:%d]\n", __func__, destid, hopcount);

/* Make sure that Port-Writes are disabled (for all ports) */
rio_mport_read_config_32(mport, destid, hopcount,
TSI568_SP_MODE_BC, &regval);
rio_mport_write_config_32(mport, destid, hopcount,
TSI568_SP_MODE_BC, regval | TSI568_SP_MODE_PW_DIS);
for (portnum = 0;
portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) {
rio_mport_read_config_32(mport, destid, hopcount,
TSI568_SP_MODE(portnum), &regval);
rio_mport_write_config_32(mport, destid, hopcount,
TSI568_SP_MODE(portnum),
regval | TSI568_SP_MODE_PW_DIS);
}

return 0;
}
Expand Down

0 comments on commit 81d30f5

Please sign in to comment.