Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2006 21:31:58 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 102692 for review
Message-ID:  <200607282131.k6SLVw11097787@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102692

Change 102692 by jb@jb_freebsd2 on 2006/07/28 21:31:15

	Back out the previous change.

Affected files ...

.. //depot/projects/dtrace/src/sys/dev/em/if_em.c#7 edit

Differences ...

==== //depot/projects/dtrace/src/sys/dev/em/if_em.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.122 2006/07/27 00:43:34 yongari Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.119 2006/07/20 04:18:45 yongari Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -1453,18 +1453,21 @@
 		m_head = m_pullup(m_head, sizeof(eh));
 		if (m_head == NULL) {
 			*m_headp = NULL;
-			return (ENOBUFS);
+			error = ENOBUFS;
+			goto encap_fail;
 		}
 		eh = *mtod(m_head, struct ether_header *);
 		M_PREPEND(m_head, sizeof(*evl), M_DONTWAIT);
 		if (m_head == NULL) {
 			*m_headp = NULL;
-			return (ENOBUFS);
+			error = ENOBUFS;
+			goto encap_fail;
 		}
 		m_head = m_pullup(m_head, sizeof(*evl));
 		if (m_head == NULL) {
 			*m_headp = NULL;
-			return (ENOBUFS);
+			error = ENOBUFS;
+			goto encap_fail;
 		}
 		evl = mtod(m_head, struct ether_vlan_header *);
 		bcopy(&eh, evl, sizeof(*evl));
@@ -1476,31 +1479,6 @@
 		*m_headp = m_head;
 	}
 
-	/*
-	 * Map the packet for DMA.
-	 */
-	tx_buffer = &sc->tx_buffer_area[sc->next_avail_tx_desc];
-	tx_buffer_last = tx_buffer;
-	map = tx_buffer->map;
-	error = bus_dmamap_load_mbuf_sg(sc->txtag, map, m_head, segs, &nsegs,
-	    BUS_DMA_NOWAIT);
-	if (error != 0) {
-		sc->no_tx_dma_setup++;
-		return (error);
-	}
-	KASSERT(nsegs != 0, ("em_encap: empty packet"));
-
-	if (nsegs > sc->num_tx_desc_avail) {
-		sc->no_tx_desc_avail2++;
-		error = ENOBUFS;
-		goto encap_fail;
-	}
-
-	if (ifp->if_hwassist > 0)
-		em_transmit_checksum_setup(sc,  m_head, &txd_upper, &txd_lower);
-	else
-		txd_upper = txd_lower = 0;
-
 	i = sc->next_avail_tx_desc;
 	if (sc->pcix_82544) {
 		txd_saved = i;



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