Deleted Added
full compact
if_dc.c (109245) if_dc.c (109623)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/dev/dc/if_dc.c 109245 2003-01-14 19:31:27Z njl $
32 * $FreeBSD: head/sys/dev/dc/if_dc.c 109623 2003-01-21 08:56:16Z alfred $
33 */
34
35/*
36 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
37 * series chips and several workalikes including the following:
38 *
39 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
40 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)

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

132
133MODULE_DEPEND(dc, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
33 */
34
35/*
36 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
37 * series chips and several workalikes including the following:
38 *
39 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
40 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)

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

132
133MODULE_DEPEND(dc, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
140 "$FreeBSD: head/sys/dev/dc/if_dc.c 109245 2003-01-14 19:31:27Z njl $";
140 "$FreeBSD: head/sys/dev/dc/if_dc.c 109623 2003-01-21 08:56:16Z alfred $";
141#endif
142
143/*
144 * Various supported device vendors/types and their names.
145 */
146static struct dc_type dc_devs[] = {
147 { DC_VENDORID_DEC, DC_DEVICEID_21143,
148 "Intel 21143 10/100BaseTX" },

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

2418 struct mbuf *m;
2419{
2420 struct mbuf *m_new = NULL;
2421 struct dc_desc *c;
2422
2423 c = &sc->dc_ldata->dc_rx_list[i];
2424
2425 if (m == NULL) {
141#endif
142
143/*
144 * Various supported device vendors/types and their names.
145 */
146static struct dc_type dc_devs[] = {
147 { DC_VENDORID_DEC, DC_DEVICEID_21143,
148 "Intel 21143 10/100BaseTX" },

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

2418 struct mbuf *m;
2419{
2420 struct mbuf *m_new = NULL;
2421 struct dc_desc *c;
2422
2423 c = &sc->dc_ldata->dc_rx_list[i];
2424
2425 if (m == NULL) {
2426 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
2426 MGETHDR(m_new, M_NOWAIT, MT_DATA);
2427 if (m_new == NULL)
2428 return(ENOBUFS);
2429
2427 if (m_new == NULL)
2428 return(ENOBUFS);
2429
2430 MCLGET(m_new, M_DONTWAIT);
2430 MCLGET(m_new, M_NOWAIT);
2431 if (!(m_new->m_flags & M_EXT)) {
2432 m_freem(m_new);
2433 return(ENOBUFS);
2434 }
2435 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
2436 } else {
2437 m_new = m;
2438 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;

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

3181static int
3182dc_coal(sc, m_head)
3183 struct dc_softc *sc;
3184 struct mbuf **m_head;
3185{
3186 struct mbuf *m_new, *m;
3187
3188 m = *m_head;
2431 if (!(m_new->m_flags & M_EXT)) {
2432 m_freem(m_new);
2433 return(ENOBUFS);
2434 }
2435 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
2436 } else {
2437 m_new = m;
2438 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;

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

3181static int
3182dc_coal(sc, m_head)
3183 struct dc_softc *sc;
3184 struct mbuf **m_head;
3185{
3186 struct mbuf *m_new, *m;
3187
3188 m = *m_head;
3189 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
3189 MGETHDR(m_new, M_NOWAIT, MT_DATA);
3190 if (m_new == NULL)
3191 return(ENOBUFS);
3192 if (m->m_pkthdr.len > MHLEN) {
3190 if (m_new == NULL)
3191 return(ENOBUFS);
3192 if (m->m_pkthdr.len > MHLEN) {
3193 MCLGET(m_new, M_DONTWAIT);
3193 MCLGET(m_new, M_NOWAIT);
3194 if (!(m_new->m_flags & M_EXT)) {
3195 m_freem(m_new);
3196 return(ENOBUFS);
3197 }
3198 }
3199 m_copydata(m, 0, m->m_pkthdr.len, mtod(m_new, caddr_t));
3200 m_new->m_pkthdr.len = m_new->m_len = m->m_pkthdr.len;
3201 m_freem(m);

--- 565 unchanged lines hidden ---
3194 if (!(m_new->m_flags & M_EXT)) {
3195 m_freem(m_new);
3196 return(ENOBUFS);
3197 }
3198 }
3199 m_copydata(m, 0, m->m_pkthdr.len, mtod(m_new, caddr_t));
3200 m_new->m_pkthdr.len = m_new->m_len = m->m_pkthdr.len;
3201 m_freem(m);

--- 565 unchanged lines hidden ---