dp83932.c (106937) | dp83932.c (109623) |
---|---|
1/* $FreeBSD: head/sys/dev/snc/dp83932.c 106937 2002-11-14 23:54:55Z sam $ */ | 1/* $FreeBSD: head/sys/dev/snc/dp83932.c 109623 2003-01-21 08:56:16Z alfred $ */ |
2/* $NecBSD: dp83932.c,v 1.5 1999/07/29 05:08:44 kmatsuda Exp $ */ 3/* $NetBSD: if_snc.c,v 1.18 1998/04/25 21:27:40 scottr Exp $ */ 4 5/* 6 * Copyright (c) 1997, 1998, 1999 7 * Kouichi Matsuda. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 1106 unchanged lines hidden (view full) --- 1116{ 1117 struct mbuf *m, *top, **mp; 1118 int len; 1119 /* 1120 * Do not trunc ether_header length. 1121 * Our sonic_read() and sonic_get() require it. 1122 */ 1123 | 2/* $NecBSD: dp83932.c,v 1.5 1999/07/29 05:08:44 kmatsuda Exp $ */ 3/* $NetBSD: if_snc.c,v 1.18 1998/04/25 21:27:40 scottr Exp $ */ 4 5/* 6 * Copyright (c) 1997, 1998, 1999 7 * Kouichi Matsuda. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 1106 unchanged lines hidden (view full) --- 1116{ 1117 struct mbuf *m, *top, **mp; 1118 int len; 1119 /* 1120 * Do not trunc ether_header length. 1121 * Our sonic_read() and sonic_get() require it. 1122 */ 1123 |
1124 MGETHDR(m, M_DONTWAIT, MT_DATA); | 1124 MGETHDR(m, M_NOWAIT, MT_DATA); |
1125 if (m == 0) 1126 return (0); 1127 m->m_pkthdr.rcvif = &sc->sc_if; 1128 m->m_pkthdr.len = datalen; 1129 len = MHLEN; 1130 top = 0; 1131 mp = ⊤ 1132 1133 while (datalen > 0) { 1134 if (top) { | 1125 if (m == 0) 1126 return (0); 1127 m->m_pkthdr.rcvif = &sc->sc_if; 1128 m->m_pkthdr.len = datalen; 1129 len = MHLEN; 1130 top = 0; 1131 mp = ⊤ 1132 1133 while (datalen > 0) { 1134 if (top) { |
1135 MGET(m, M_DONTWAIT, MT_DATA); | 1135 MGET(m, M_NOWAIT, MT_DATA); |
1136 if (m == 0) { 1137 m_freem(top); 1138 return (0); 1139 } 1140 len = MLEN; 1141 } 1142 if (datalen >= MINCLSIZE) { | 1136 if (m == 0) { 1137 m_freem(top); 1138 return (0); 1139 } 1140 len = MLEN; 1141 } 1142 if (datalen >= MINCLSIZE) { |
1143 MCLGET(m, M_DONTWAIT); | 1143 MCLGET(m, M_NOWAIT); |
1144 if ((m->m_flags & M_EXT) == 0) { 1145 if (top) m_freem(top); 1146 return (0); 1147 } 1148 len = MCLBYTES; 1149 } 1150#if 0 1151 /* XXX: Require? */ --- 61 unchanged lines hidden --- | 1144 if ((m->m_flags & M_EXT) == 0) { 1145 if (top) m_freem(top); 1146 return (0); 1147 } 1148 len = MCLBYTES; 1149 } 1150#if 0 1151 /* XXX: Require? */ --- 61 unchanged lines hidden --- |