diff options
author | Yitchak Gertner <gertner@broadcom.com> | 2008-08-25 18:24:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-25 18:24:21 -0400 |
commit | 3cdf1db7db1649771d683b6ba323ff604ea3cc5e (patch) | |
tree | c90ccc928ca997113fcef4d9664b52dc54982cb5 /drivers | |
parent | 46230476b7c66f7cbc013b771873c797f7ba770b (diff) |
bnx2x: Initialization structure
The TPA initialization is part of the FW internal memory initialization
and so it is moved to the appropriate function
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x_main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index cb91802ea48a..398daeb5be90 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -4606,6 +4606,17 @@ static void bnx2x_init_internal_common(struct bnx2x *bp) | |||
4606 | { | 4606 | { |
4607 | int i; | 4607 | int i; |
4608 | 4608 | ||
4609 | if (bp->flags & TPA_ENABLE_FLAG) { | ||
4610 | struct tstorm_eth_tpa_exist tpa = {0}; | ||
4611 | |||
4612 | tpa.tpa_exist = 1; | ||
4613 | |||
4614 | REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET, | ||
4615 | ((u32 *)&tpa)[0]); | ||
4616 | REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET + 4, | ||
4617 | ((u32 *)&tpa)[1]); | ||
4618 | } | ||
4619 | |||
4609 | /* Zero this manually as its initialization is | 4620 | /* Zero this manually as its initialization is |
4610 | currently missing in the initTool */ | 4621 | currently missing in the initTool */ |
4611 | for (i = 0; i < (USTORM_AGG_DATA_SIZE >> 2); i++) | 4622 | for (i = 0; i < (USTORM_AGG_DATA_SIZE >> 2); i++) |
@@ -5365,17 +5376,6 @@ static int bnx2x_init_common(struct bnx2x *bp) | |||
5365 | 5376 | ||
5366 | enable_blocks_attention(bp); | 5377 | enable_blocks_attention(bp); |
5367 | 5378 | ||
5368 | if (bp->flags & TPA_ENABLE_FLAG) { | ||
5369 | struct tstorm_eth_tpa_exist tmp = {0}; | ||
5370 | |||
5371 | tmp.tpa_exist = 1; | ||
5372 | |||
5373 | REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET, | ||
5374 | ((u32 *)&tmp)[0]); | ||
5375 | REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET + 4, | ||
5376 | ((u32 *)&tmp)[1]); | ||
5377 | } | ||
5378 | |||
5379 | if (!BP_NOMCP(bp)) { | 5379 | if (!BP_NOMCP(bp)) { |
5380 | bnx2x_acquire_phy_lock(bp); | 5380 | bnx2x_acquire_phy_lock(bp); |
5381 | bnx2x_common_init_phy(bp, bp->common.shmem_base); | 5381 | bnx2x_common_init_phy(bp, bp->common.shmem_base); |