|
@@ -2033,11 +2033,13 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
|
|
|
bool dummy_wrb;
|
|
bool dummy_wrb;
|
|
|
int i, pending_txqs;
|
|
int i, pending_txqs;
|
|
|
|
|
|
|
|
- /* Wait for a max of 200ms for all the tx-completions to arrive. */
|
|
|
|
|
|
|
+ /* Stop polling for compls when HW has been silent for 10ms */
|
|
|
do {
|
|
do {
|
|
|
pending_txqs = adapter->num_tx_qs;
|
|
pending_txqs = adapter->num_tx_qs;
|
|
|
|
|
|
|
|
for_all_tx_queues(adapter, txo, i) {
|
|
for_all_tx_queues(adapter, txo, i) {
|
|
|
|
|
+ cmpl = 0;
|
|
|
|
|
+ num_wrbs = 0;
|
|
|
txq = &txo->q;
|
|
txq = &txo->q;
|
|
|
while ((txcp = be_tx_compl_get(&txo->cq))) {
|
|
while ((txcp = be_tx_compl_get(&txo->cq))) {
|
|
|
end_idx =
|
|
end_idx =
|
|
@@ -2050,14 +2052,13 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
|
|
|
if (cmpl) {
|
|
if (cmpl) {
|
|
|
be_cq_notify(adapter, txo->cq.id, false, cmpl);
|
|
be_cq_notify(adapter, txo->cq.id, false, cmpl);
|
|
|
atomic_sub(num_wrbs, &txq->used);
|
|
atomic_sub(num_wrbs, &txq->used);
|
|
|
- cmpl = 0;
|
|
|
|
|
- num_wrbs = 0;
|
|
|
|
|
|
|
+ timeo = 0;
|
|
|
}
|
|
}
|
|
|
if (atomic_read(&txq->used) == 0)
|
|
if (atomic_read(&txq->used) == 0)
|
|
|
pending_txqs--;
|
|
pending_txqs--;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (pending_txqs == 0 || ++timeo > 200)
|
|
|
|
|
|
|
+ if (pending_txqs == 0 || ++timeo > 10 || be_hw_error(adapter))
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
mdelay(1);
|
|
mdelay(1);
|