mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
Add a test to ti_encap() to try and prevent the transmit producer index
from ever catching up to the transmit consumer index. We can't let this happen because ti_txeof() depends on the assumption that producer == consumer means the ring is empty, and producer != consumer means the ring has some number of active descriptors in it.
This commit is contained in:
parent
f677e15fe8
commit
737267b891
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46177
|
@ -29,7 +29,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $
|
||||
* $Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -128,7 +128,7 @@
|
|||
|
||||
#if !defined(lint)
|
||||
static const char rcsid[] =
|
||||
"$Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $";
|
||||
"$Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2053,6 +2053,9 @@ static int ti_encap(sc, m_head, txidx)
|
|||
if (m != NULL)
|
||||
return(ENOBUFS);
|
||||
|
||||
if (frag == sc->ti_tx_saved_considx)
|
||||
return(ENOBUFS);
|
||||
|
||||
if (sc->ti_hwrev == TI_HWREV_TIGON)
|
||||
sc->ti_rdata->ti_tx_ring_nic[cur % 128].ti_flags |=
|
||||
TI_BDFLAG_END;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $
|
||||
* $Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -128,7 +128,7 @@
|
|||
|
||||
#if !defined(lint)
|
||||
static const char rcsid[] =
|
||||
"$Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $";
|
||||
"$Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2053,6 +2053,9 @@ static int ti_encap(sc, m_head, txidx)
|
|||
if (m != NULL)
|
||||
return(ENOBUFS);
|
||||
|
||||
if (frag == sc->ti_tx_saved_considx)
|
||||
return(ENOBUFS);
|
||||
|
||||
if (sc->ti_hwrev == TI_HWREV_TIGON)
|
||||
sc->ti_rdata->ti_tx_ring_nic[cur % 128].ti_flags |=
|
||||
TI_BDFLAG_END;
|
||||
|
|
Loading…
Reference in a new issue