jme(4): jme_start() use JME_MAXTXSEGS when checking available TX descs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

jme(4): jme_start() use JME_MAXTXSEGS when checking available TX descs

Brad Smith-14
jme_start() should be checking if JME_MAXTXSEGS TX descs are available
instead of just the 1 reserved descriptor (JME_TXD_RSVD).


Index: if_jme.c
===================================================================
RCS file: /home/cvs/src/sys/dev/pci/if_jme.c,v
retrieving revision 1.51
diff -u -p -u -p -r1.51 if_jme.c
--- if_jme.c 29 Mar 2019 17:25:44 -0000 1.51
+++ if_jme.c 14 Apr 2019 17:44:12 -0000
@@ -1213,7 +1213,7 @@ jme_start(struct ifnet *ifp)
  * Check number of available TX descs, always
  * leave JME_TXD_RSVD free TX descs.
  */
- if (sc->jme_cdata.jme_tx_cnt + JME_TXD_RSVD >
+ if (sc->jme_cdata.jme_tx_cnt + JME_MAXTXSEGS + JME_TXD_RSVD >=
     JME_TX_RING_CNT - JME_TXD_RSVD) {
  ifq_set_oactive(&ifp->if_snd);
  break;