Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.36 (requested by tron in...
details: https://anonhg.NetBSD.org/src/rev/b2859983ee37
branches: netbsd-1-6
changeset: 530297:b2859983ee37
user: grant <grant%NetBSD.org@localhost>
date: Mon Jun 16 13:44:27 2003 +0000
description:
Pull up revision 1.36 (requested by tron in ticket #1256):
Pullup short mbuf in wm_tx_cksum() instead of dropping it which fixes
PR kern/21190 by myself. Jason R. Thorpe code reviewed the changes.
diffstat:
sys/dev/pci/if_wm.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r ca2010b3f957 -r b2859983ee37 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon Jun 16 13:42:18 2003 +0000
+++ b/sys/dev/pci/if_wm.c Mon Jun 16 13:44:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.9.4.8 2002/11/08 08:50:24 tron Exp $ */
+/* $NetBSD: if_wm.c,v 1.9.4.9 2003/06/16 13:44:27 grant Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -1003,11 +1003,13 @@
return (0);
}
- /* XXX */
if (m0->m_len < (offset + iphl)) {
- printf("%s: wm_tx_cksum: need to m_pullup, "
- "packet dropped\n", sc->sc_dev.dv_xname);
- return (EINVAL);
+ if ((txs->txs_mbuf = m_pullup(m0, offset + iphl)) == NULL) {
+ printf("%s: wm_tx_cksum: mbuf allocation failed, "
+ "packet dropped\n", sc->sc_dev.dv_xname);
+ return (ENOMEM);
+ }
+ m0 = txs->txs_mbuf;
}
ip = (struct ip *) (mtod(m0, caddr_t) + offset);
@@ -1233,9 +1235,7 @@
if (wm_tx_cksum(sc, txs, &cksumcmd,
&cksumfields) != 0) {
/* Error message already displayed. */
- m_freem(m0);
bus_dmamap_unload(sc->sc_dmat, dmamap);
- txs->txs_mbuf = NULL;
continue;
}
} else {
Home |
Main Index |
Thread Index |
Old Index