diff options
| -rw-r--r-- | sys/dev/sf/if_sf.c | 8 | ||||
| -rw-r--r-- | sys/pci/if_sf.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index 8f5fec3c0755..c0c05d5300a1 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -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) { diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index 8f5fec3c0755..c0c05d5300a1 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/if_sf.c @@ -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) { |
