Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2017 02:34:37 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326925 - head/sys/arm/broadcom/bcm2835
Message-ID:  <201712180234.vBI2YbnB034655@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712180234.vBI2YbnB034655>