summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-11-18 03:58:15 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-11-18 03:58:15 +0000
commitf70a7869dacc661d5fe9a16481ceb72e15bfd83b (patch)
tree6630da480888398ea5b6d5a8c466047aa0a56135 /sys/dev/pci/if_em.c
parent77943e455ab3e626e6decefefab98c15870860f3 (diff)
revert part of rev 1.45 ..
- Modify the caller of em_encap() to detect a NULL m_head and not try to queue the mbuf if that happens. which was in preparation for a software-based workaround for a HW VLAN tagging issue, but due to a HW limitation with tagging, we cannot use HW VLAN tagging at all.
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 349d718376c..1ae31ab8453 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.89 2005/11/15 01:40:43 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.90 2005/11/18 03:58:14 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -144,7 +144,7 @@ void em_print_hw_stats(struct em_softc *);
void em_update_link_status(struct em_softc *);
int em_get_buf(int, struct em_softc *,
struct mbuf *);
-int em_encap(struct em_softc *, struct mbuf **);
+int em_encap(struct em_softc *, struct mbuf *);
void em_smartspeed(struct em_softc *);
int em_82547_fifo_workaround(struct em_softc *, int);
void em_82547_update_fifo_head(struct em_softc *, int);
@@ -411,13 +411,7 @@ em_start(struct ifnet *ifp)
if (m_head == NULL)
break;
- /*
- * em_encap() can modify our pointer, and or make it NULL on
- * failure. In that event, we can't requeue.
- */
- if (em_encap(sc, &m_head)) {
- if (m_head == NULL)
- break;
+ if (em_encap(sc, m_head)) {
ifp->if_flags |= IFF_OACTIVE;
break;
}
@@ -879,15 +873,13 @@ em_media_change(struct ifnet *ifp)
* return 0 on success, positive on failure
**********************************************************************/
int
-em_encap(struct em_softc *sc, struct mbuf **m_headp)
+em_encap(struct em_softc *sc, struct mbuf *m_head)
{
u_int32_t txd_upper;
u_int32_t txd_lower, txd_used = 0, txd_saved = 0;
int i, j, error;
u_int64_t address;
- struct mbuf *m_head;
-
/* For 82544 Workaround */
DESC_ARRAY desc_array;
u_int32_t array_elements;
@@ -898,8 +890,6 @@ em_encap(struct em_softc *sc, struct mbuf **m_headp)
struct em_buffer *tx_buffer = NULL;
struct em_tx_desc *current_tx_desc = NULL;
- m_head = *m_headp;
-
/*
* Force a cleanup if number of TX descriptors
* available hits the threshold