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>
This commit is contained in:
Родитель
46230476b7
Коммит
3cdf1db7db
|
@ -4606,6 +4606,17 @@ static void bnx2x_init_internal_common(struct bnx2x *bp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (bp->flags & TPA_ENABLE_FLAG) {
|
||||||
|
struct tstorm_eth_tpa_exist tpa = {0};
|
||||||
|
|
||||||
|
tpa.tpa_exist = 1;
|
||||||
|
|
||||||
|
REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET,
|
||||||
|
((u32 *)&tpa)[0]);
|
||||||
|
REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET + 4,
|
||||||
|
((u32 *)&tpa)[1]);
|
||||||
|
}
|
||||||
|
|
||||||
/* Zero this manually as its initialization is
|
/* Zero this manually as its initialization is
|
||||||
currently missing in the initTool */
|
currently missing in the initTool */
|
||||||
for (i = 0; i < (USTORM_AGG_DATA_SIZE >> 2); i++)
|
for (i = 0; i < (USTORM_AGG_DATA_SIZE >> 2); i++)
|
||||||
|
@ -5365,17 +5376,6 @@ static int bnx2x_init_common(struct bnx2x *bp)
|
||||||
|
|
||||||
enable_blocks_attention(bp);
|
enable_blocks_attention(bp);
|
||||||
|
|
||||||
if (bp->flags & TPA_ENABLE_FLAG) {
|
|
||||||
struct tstorm_eth_tpa_exist tmp = {0};
|
|
||||||
|
|
||||||
tmp.tpa_exist = 1;
|
|
||||||
|
|
||||||
REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET,
|
|
||||||
((u32 *)&tmp)[0]);
|
|
||||||
REG_WR(bp, BAR_TSTRORM_INTMEM + TSTORM_TPA_EXIST_OFFSET + 4,
|
|
||||||
((u32 *)&tmp)[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BP_NOMCP(bp)) {
|
if (!BP_NOMCP(bp)) {
|
||||||
bnx2x_acquire_phy_lock(bp);
|
bnx2x_acquire_phy_lock(bp);
|
||||||
bnx2x_common_init_phy(bp, bp->common.shmem_base);
|
bnx2x_common_init_phy(bp, bp->common.shmem_base);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче