diff options
author | jfv <jfv@FreeBSD.org> | 2011-01-12 00:23:47 +0000 |
---|---|---|
committer | jfv <jfv@FreeBSD.org> | 2011-01-12 00:23:47 +0000 |
commit | 3af73385cb78ed044e3181252a5e7e66e70bc767 (patch) | |
tree | 076abe2057b99761610d7eaa522f14611fee5d55 /sys/dev/e1000 | |
parent | c2d8b7c75a6860a6575be6f570672c5076047df3 (diff) | |
download | FreeBSD-src-3af73385cb78ed044e3181252a5e7e66e70bc767.zip FreeBSD-src-3af73385cb78ed044e3181252a5e7e66e70bc767.tar.gz |
A couple problems discovered by Andrew Boyer:
- failure code in em_xmit got mangled along the way
and was not properly handling errors.
- local timer code had a leftover UNLOCK call that
should be removed.
MFC after 3 days
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r-- | sys/dev/e1000/if_em.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 4cfda7f..103f66a 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -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 **m_headp) 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); } |