svn commit: r217723 - stable/7/sys/dev/e1000

Jack F Vogel jfv at FreeBSD.org
Sat Jan 22 20:00:25 UTC 2011


Author: jfv
Date: Sat Jan 22 20:00:24 2011
New Revision: 217723
URL: http://svn.freebsd.org/changeset/base/217723

Log:
  MFC rev 217295

Modified:
  stable/7/sys/dev/e1000/if_em.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/e1000/if_em.c
==============================================================================
--- stable/7/sys/dev/e1000/if_em.c	Sat Jan 22 19:25:49 2011	(r217722)
+++ stable/7/sys/dev/e1000/if_em.c	Sat Jan 22 20:00:24 2011	(r217723)
@@ -90,7 +90,7 @@ int	em_display_debug_stats = 0;
 /*********************************************************************
  *  Driver version:
  *********************************************************************/
-char em_driver_version[] = "7.1.8";
+char em_driver_version[] = "7.1.9";
 
 /*********************************************************************
  *  PCI Device ID Table
@@ -1788,14 +1788,23 @@ em_xmit(struct tx_ring *txr, struct mbuf
 		error = bus_dmamap_load_mbuf_sg(txr->txtag, map,
 		    *m_headp, segs, &nsegs, BUS_DMA_NOWAIT);
 
-		if (error) {
+		if (error == ENOMEM) {
+			adapter->no_tx_dma_setup++;
+			return (error);
+		} else if (error != 0) {
 			adapter->no_tx_dma_setup++;
 			m_freem(*m_headp);
 			*m_headp = NULL;
 			return (error);
 		}
+
+	} else if (error == ENOMEM) {
+		adapter->no_tx_dma_setup++;
+		return (error);
 	} else if (error != 0) {
 		adapter->no_tx_dma_setup++;
+		m_freem(*m_headp);
+		*m_headp = NULL;
 		return (error);
 	}
 
@@ -2077,7 +2086,6 @@ hung:
 	    txr->me, txr->tx_avail, txr->next_to_clean);
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	adapter->watchdog_events++;
-	EM_TX_UNLOCK(txr);
 	em_init_locked(adapter);
 }
 


More information about the svn-src-stable-7 mailing list