PERFORCE change 39767 for review

Sam Leffler sam at FreeBSD.org
Wed Oct 15 21:14:21 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=39767

Change 39767 by sam at sam_ebb on 2003/10/15 21:13:43

	Check return value from bus_dmamap_load_mbuf more closely;
	when this is EFBIG the packet required too many segments
	and we need to force state to get the descriptor coalescing
	logic to be used.
	
	Reported on netbsd mailing list.

Affected files ...

.. //depot/projects/netperf/sys/dev/ath/if_ath.c#22 edit

Differences ...

==== //depot/projects/netperf/sys/dev/ath/if_ath.c#22 (text+ko) ====

@@ -1765,7 +1765,10 @@
 	error = bus_dmamap_load_mbuf(sc->sc_dmat, bf->bf_dmamap, m0,
 				     ath_mbuf_load_cb, bf,
 				     BUS_DMA_NOWAIT);
-	if (error != 0) {
+	if (error == EFBIG) {
+		/* XXX packet requires too many descriptors */
+		bf->bf_nseg = ATH_TXDESC+1;
+	} else if (error != 0) {
 		sc->sc_stats.ast_tx_busdma++;
 		m_freem(m0);
 		return error;


More information about the p4-projects mailing list