After one more day of testing, make what I hope are the final tweaks to
prevent/workaround TX lockups in this driver. The secret seems to be to not let the TX DMA queue become too full. If we have too many packets in the queue, we should wait for them to drain a bit before trying to queue more. This should prevent the lockup from occurring, and if it does occur, there is special code in sf_start() to kick the NIC in the head and get it going again. Special thanks to Glen Neff for helping me test this fix.
This commit is contained in:
parent
e113a479b2
commit
d3ab0d02cf
@ -1348,9 +1348,6 @@ static void sf_start(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sc->sf_tx_cnt)
|
||||
sf_txeof(sc);
|
||||
|
||||
txprod = csr_read_4(sc, SF_TXDQ_PRODIDX);
|
||||
i = SF_IDX_HI(txprod) >> 4;
|
||||
|
||||
@ -1388,6 +1385,11 @@ static void sf_start(ifp)
|
||||
|
||||
SF_INC(i, SF_TX_DLIST_CNT);
|
||||
sc->sf_tx_cnt++;
|
||||
/*
|
||||
* Don't get the TX DMA queue get too full.
|
||||
*/
|
||||
if (sc->sf_tx_cnt > 64)
|
||||
break;
|
||||
}
|
||||
|
||||
if (cur_tx == NULL) {
|
||||
|
@ -1348,9 +1348,6 @@ static void sf_start(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sc->sf_tx_cnt)
|
||||
sf_txeof(sc);
|
||||
|
||||
txprod = csr_read_4(sc, SF_TXDQ_PRODIDX);
|
||||
i = SF_IDX_HI(txprod) >> 4;
|
||||
|
||||
@ -1388,6 +1385,11 @@ static void sf_start(ifp)
|
||||
|
||||
SF_INC(i, SF_TX_DLIST_CNT);
|
||||
sc->sf_tx_cnt++;
|
||||
/*
|
||||
* Don't get the TX DMA queue get too full.
|
||||
*/
|
||||
if (sc->sf_tx_cnt > 64)
|
||||
break;
|
||||
}
|
||||
|
||||
if (cur_tx == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user