Author: jfv
Date: Tue Jan 25 22:25:50 2011
New Revision: 217860
URL: http://svn.freebsd.org/changeset/base/217860

Log:
  MFC stable/8 r217710
  
        - Pieces of the failure path in em_xmit got deleted along
          the way, correct this.
        - local_timer had a leftover TX_UNLOCK without matching
          LOCK in the error path, remove it.
  
  Approved by:  re (bz)

Modified:
  releng/8.2/sys/dev/e1000/if_em.c
Directory Properties:
  releng/8.2/sys/   (props changed)
  releng/8.2/sys/amd64/include/xen/   (props changed)
  releng/8.2/sys/cddl/contrib/opensolaris/   (props changed)
  releng/8.2/sys/contrib/dev/acpica/   (props changed)
  releng/8.2/sys/contrib/pf/   (props changed)

Modified: releng/8.2/sys/dev/e1000/if_em.c
==============================================================================
--- releng/8.2/sys/dev/e1000/if_em.c    Tue Jan 25 22:25:16 2011        
(r217859)
+++ releng/8.2/sys/dev/e1000/if_em.c    Tue Jan 25 22:25:50 2011        
(r217860)
@@ -93,7 +93,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
@@ -1909,14 +1909,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);
        }
 
@@ -2206,7 +2215,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);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to