Commit 660492bc authored by Manish Chopra's avatar Manish Chopra Committed by David S. Miller

qed: Fix EQ full firmware assert.

When slowpath messages are sent with high rate, the resulting
events can lead to a FW assert in case they are not handled fast
enough (Event Queue Full assert). Attempt to send queued slowpath
messages only after the newly evacuated entries in the EQ ring
are indicated to FW.
Signed-off-by: default avatarManish Chopra <manishc@marvell.com>
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00670cb8
...@@ -382,6 +382,7 @@ void qed_consq_setup(struct qed_hwfn *p_hwfn); ...@@ -382,6 +382,7 @@ void qed_consq_setup(struct qed_hwfn *p_hwfn);
* @param p_hwfn * @param p_hwfn
*/ */
void qed_consq_free(struct qed_hwfn *p_hwfn); void qed_consq_free(struct qed_hwfn *p_hwfn);
int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
/** /**
* @file * @file
......
...@@ -397,6 +397,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie) ...@@ -397,6 +397,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain)); qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
/* Attempt to post pending requests */
spin_lock_bh(&p_hwfn->p_spq->lock);
rc = qed_spq_pend_post(p_hwfn);
spin_unlock_bh(&p_hwfn->p_spq->lock);
return rc; return rc;
} }
...@@ -767,7 +772,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn, ...@@ -767,7 +772,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
return 0; return 0;
} }
static int qed_spq_pend_post(struct qed_hwfn *p_hwfn) int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
{ {
struct qed_spq *p_spq = p_hwfn->p_spq; struct qed_spq *p_spq = p_hwfn->p_spq;
struct qed_spq_entry *p_ent = NULL; struct qed_spq_entry *p_ent = NULL;
...@@ -905,7 +910,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn, ...@@ -905,7 +910,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent = NULL; struct qed_spq_entry *p_ent = NULL;
struct qed_spq_entry *tmp; struct qed_spq_entry *tmp;
struct qed_spq_entry *found = NULL; struct qed_spq_entry *found = NULL;
int rc;
if (!p_hwfn) if (!p_hwfn)
return -EINVAL; return -EINVAL;
...@@ -963,12 +967,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn, ...@@ -963,12 +967,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
*/ */
qed_spq_return_entry(p_hwfn, found); qed_spq_return_entry(p_hwfn, found);
/* Attempt to post pending requests */ return 0;
spin_lock_bh(&p_spq->lock);
rc = qed_spq_pend_post(p_hwfn);
spin_unlock_bh(&p_spq->lock);
return rc;
} }
int qed_consq_alloc(struct qed_hwfn *p_hwfn) int qed_consq_alloc(struct qed_hwfn *p_hwfn)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment