From 76008af14929770082a9ce88ffea788da2c3266f Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 17 Sep 2006 20:26:15 +0000 Subject: Overhaul RX path to recover from mbuf cluster allocation failure. - Create a spare DMA map for RX handler to recover from bus_dmamap_load() failure. - Make sure to update status bit in RX descriptors even if we failed to allocate a new buffer. - Don't blindly unload DMA map. Reuse loaded DMA map if received packet has errors. From yongari@FreeBSD Tested by myself and a number of end-users on i386/amd64/sparc64 --- sys/dev/pci/if_em.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/pci/if_em.h') diff --git a/sys/dev/pci/if_em.h b/sys/dev/pci/if_em.h index 8a7f970cbb3..1fc3feff912 100644 --- a/sys/dev/pci/if_em.h +++ b/sys/dev/pci/if_em.h @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /* $FreeBSD: if_em.h,v 1.26 2004/09/01 23:22:41 pdeuskar Exp $ */ -/* $OpenBSD: if_em.h,v 1.28 2006/09/17 17:51:01 brad Exp $ */ +/* $OpenBSD: if_em.h,v 1.29 2006/09/17 20:26:14 brad Exp $ */ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -347,6 +347,7 @@ struct em_softc { u_int32_t txd_cmd; struct em_buffer *tx_buffer_area; bus_dma_tag_t txtag; /* dma tag for tx */ + bus_dmamap_t rx_sparemap; /* * Receive definitions -- cgit v1.2.3