forked from Minki/linux
be2net: Fix issues in error recovery due to wrong queue state
During recovery from a FW error, destroy queue operation may fail. Queue should be marked as destroyed so that recovery code can recreate the queue. Also fix queue created state not getting checked at one instance. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db15dfa957
commit
aa790db9a7
@ -681,6 +681,9 @@ static struct be_mcc_wrb *wrb_from_mccq(struct be_adapter *adapter)
|
|||||||
struct be_queue_info *mccq = &adapter->mcc_obj.q;
|
struct be_queue_info *mccq = &adapter->mcc_obj.q;
|
||||||
struct be_mcc_wrb *wrb;
|
struct be_mcc_wrb *wrb;
|
||||||
|
|
||||||
|
if (!mccq->created)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (atomic_read(&mccq->used) >= mccq->len) {
|
if (atomic_read(&mccq->used) >= mccq->len) {
|
||||||
dev_err(&adapter->pdev->dev, "Out of MCCQ wrbs\n");
|
dev_err(&adapter->pdev->dev, "Out of MCCQ wrbs\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1235,7 +1238,6 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
|
|||||||
req->id = cpu_to_le16(q->id);
|
req->id = cpu_to_le16(q->id);
|
||||||
|
|
||||||
status = be_mbox_notify_wait(adapter);
|
status = be_mbox_notify_wait(adapter);
|
||||||
if (!status)
|
|
||||||
q->created = false;
|
q->created = false;
|
||||||
|
|
||||||
mutex_unlock(&adapter->mbox_lock);
|
mutex_unlock(&adapter->mbox_lock);
|
||||||
@ -1263,7 +1265,6 @@ int be_cmd_rxq_destroy(struct be_adapter *adapter, struct be_queue_info *q)
|
|||||||
req->id = cpu_to_le16(q->id);
|
req->id = cpu_to_le16(q->id);
|
||||||
|
|
||||||
status = be_mcc_notify_wait(adapter);
|
status = be_mcc_notify_wait(adapter);
|
||||||
if (!status)
|
|
||||||
q->created = false;
|
q->created = false;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
Loading…
Reference in New Issue
Block a user