Author: ian
Date: Mon Dec 18 02:34:37 2017
New Revision: 326925
URL: https://svnweb.freebsd.org/changeset/base/326925

Log:
  Do not attempt to refill the TX fifo if there is no data left to transfer.
  
  A comment in bcm_bsc_fill_tx_fifo() even lists sc_totlen > 0 as a
  precondition for calling the routine.   I apparently forgot to make the
  code do what my comment said.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Dec 18 00:15:53 2017        
(r326924)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Dec 18 02:34:37 2017        
(r326925)
@@ -508,7 +508,7 @@ bcm_bsc_intr(void *arg)
                 * transfer is complete; TXD will be asserted along with ERR or
                 * DONE if there is room in the fifo.
                 */
-               if (status & BCM_BSC_STATUS_TXD)
+               if ((status & BCM_BSC_STATUS_TXD) && sc->sc_totlen > 0)
                        bcm_bsc_fill_tx_fifo(sc);
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to