Deleted Added
full compact
if_ie.c (106937) if_ie.c (109623)
1/*-
2 * Copyright (c) 1992, 1993, University of Vermont and State
3 * Agricultural College.
4 * Copyright (c) 1992, 1993, Garrett A. Wollman.
5 *
6 * Portions:
7 * Copyright (c) 1990, 1991, William F. Jolitz
8 * Copyright (c) 1990, The Regents of the University of California

--- 33 unchanged lines hidden (view full) ---

42 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * SUCH DAMAGE.
49 *
1/*-
2 * Copyright (c) 1992, 1993, University of Vermont and State
3 * Agricultural College.
4 * Copyright (c) 1992, 1993, Garrett A. Wollman.
5 *
6 * Portions:
7 * Copyright (c) 1990, 1991, William F. Jolitz
8 * Copyright (c) 1990, The Regents of the University of California

--- 33 unchanged lines hidden (view full) ---

42 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * SUCH DAMAGE.
49 *
50 * $FreeBSD: head/sys/dev/ie/if_ie.c 106937 2002-11-14 23:54:55Z sam $
50 * $FreeBSD: head/sys/dev/ie/if_ie.c 109623 2003-01-21 08:56:16Z alfred $
51 *
52 * MAINTAINER: Matthew N. Dodd <winter@jurai.net>
53 */
54
55/*
56 * Intel 82586 Ethernet chip
57 * Register, bit, and structure definitions.
58 *

--- 1069 unchanged lines hidden (view full) ---

1128 int totlen, resid;
1129 int thismboff;
1130 int head;
1131
1132 totlen = ie_packet_len(unit, ie);
1133 if (totlen <= 0)
1134 return (-1);
1135
51 *
52 * MAINTAINER: Matthew N. Dodd <winter@jurai.net>
53 */
54
55/*
56 * Intel 82586 Ethernet chip
57 * Register, bit, and structure definitions.
58 *

--- 1069 unchanged lines hidden (view full) ---

1128 int totlen, resid;
1129 int thismboff;
1130 int head;
1131
1132 totlen = ie_packet_len(unit, ie);
1133 if (totlen <= 0)
1134 return (-1);
1135
1136 MGETHDR(m, M_DONTWAIT, MT_DATA);
1136 MGETHDR(m, M_NOWAIT, MT_DATA);
1137 if (!m) {
1138 ie_drop_packet_buffer(unit, ie);
1139 /* XXXX if_ierrors++; */
1140 return (-1);
1141 }
1142
1143 /*
1144 * Snarf the Ethernet header.

--- 38 unchanged lines hidden (view full) ---

1183 * Try to allocate an mbuf to hold the data that we have.
1184 * If we already allocated one, just get another one and
1185 * stick it on the end (eventually). If we don't already
1186 * have one, try to allocate an mbuf cluster big enough to
1187 * hold the whole packet, if we think it's reasonable, or a
1188 * single mbuf which may or may not be big enough. Got that?
1189 */
1190 if (top) {
1137 if (!m) {
1138 ie_drop_packet_buffer(unit, ie);
1139 /* XXXX if_ierrors++; */
1140 return (-1);
1141 }
1142
1143 /*
1144 * Snarf the Ethernet header.

--- 38 unchanged lines hidden (view full) ---

1183 * Try to allocate an mbuf to hold the data that we have.
1184 * If we already allocated one, just get another one and
1185 * stick it on the end (eventually). If we don't already
1186 * have one, try to allocate an mbuf cluster big enough to
1187 * hold the whole packet, if we think it's reasonable, or a
1188 * single mbuf which may or may not be big enough. Got that?
1189 */
1190 if (top) {
1191 MGET(m, M_DONTWAIT, MT_DATA);
1191 MGET(m, M_NOWAIT, MT_DATA);
1192 if (!m) {
1193 m_freem(top);
1194 ie_drop_packet_buffer(unit, ie);
1195 return (-1);
1196 }
1197 m->m_len = MLEN;
1198 }
1199 if (resid >= MINCLSIZE) {
1192 if (!m) {
1193 m_freem(top);
1194 ie_drop_packet_buffer(unit, ie);
1195 return (-1);
1196 }
1197 m->m_len = MLEN;
1198 }
1199 if (resid >= MINCLSIZE) {
1200 MCLGET(m, M_DONTWAIT);
1200 MCLGET(m, M_NOWAIT);
1201 if (m->m_flags & M_EXT)
1202 m->m_len = min(resid, MCLBYTES);
1203 } else {
1204 if (resid < m->m_len) {
1205 if (!top && resid + max_linkhdr <= m->m_len)
1206 m->m_data += max_linkhdr;
1207 m->m_len = resid;
1208 }

--- 981 unchanged lines hidden ---
1201 if (m->m_flags & M_EXT)
1202 m->m_len = min(resid, MCLBYTES);
1203 } else {
1204 if (resid < m->m_len) {
1205 if (!top && resid + max_linkhdr <= m->m_len)
1206 m->m_data += max_linkhdr;
1207 m->m_len = resid;
1208 }

--- 981 unchanged lines hidden ---