Skip to content

Commit

Permalink
qed: fix ILT configuration of SRC block
Browse files Browse the repository at this point in the history
[ Upstream commit 93be526 ]

The code refactoring of ILT configuration was not complete, the old
unused variables were used for the SRC block. That could lead to the memory
corruption by HW when rx filters are configured.
This patch completes that refactoring.

Fixes: 8a52bba (qed: Debug feature: ilt and mdump)
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
Link: https://lore.kernel.org/r/20201116132944.2055-1-dbogdanov@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
logost authored and gregkh committed Nov 24, 2020
1 parent 4cc7d98 commit 9495a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/qlogic/qed/qed_cxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1647,9 +1647,9 @@ static void qed_src_init_pf(struct qed_hwfn *p_hwfn)
ilog2(rounded_conn_num));

STORE_RT_REG_AGG(p_hwfn, SRC_REG_FIRSTFREE_RT_OFFSET,
p_hwfn->p_cxt_mngr->first_free);
p_hwfn->p_cxt_mngr->src_t2.first_free);
STORE_RT_REG_AGG(p_hwfn, SRC_REG_LASTFREE_RT_OFFSET,
p_hwfn->p_cxt_mngr->last_free);
p_hwfn->p_cxt_mngr->src_t2.last_free);
}

/* Timers PF */
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/qlogic/qed/qed_cxt.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,6 @@ struct qed_cxt_mngr {

/* SRC T2 */
struct qed_src_t2 src_t2;
u32 t2_num_pages;
u64 first_free;
u64 last_free;

/* total number of SRQ's for this hwfn */
u32 srq_count;
Expand Down

0 comments on commit 9495a88

Please sign in to comment.