Deleted Added
full compact
if_gem.c (108964) if_gem.c (109623)
1/*
2 * Copyright (C) 2001 Eduardo Horvath.
3 * Copyright (c) 2001-2003 Thomas Moestl
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * from: NetBSD: gem.c,v 1.21 2002/06/01 23:50:58 lukem Exp
28 *
1/*
2 * Copyright (C) 2001 Eduardo Horvath.
3 * Copyright (c) 2001-2003 Thomas Moestl
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * from: NetBSD: gem.c,v 1.21 2002/06/01 23:50:58 lukem Exp
28 *
29 * $FreeBSD: head/sys/dev/gem/if_gem.c 108964 2003-01-08 20:12:45Z tmm $
29 * $FreeBSD: head/sys/dev/gem/if_gem.c 109623 2003-01-21 08:56:16Z alfred $
30 */
31
32/*
33 * Driver for Sun GEM ethernet controllers.
34 */
35
36#define GEM_DEBUG
37

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

1420gem_add_rxbuf(sc, idx)
1421 struct gem_softc *sc;
1422 int idx;
1423{
1424 struct gem_rxsoft *rxs = &sc->sc_rxsoft[idx];
1425 struct mbuf *m;
1426 int error;
1427
30 */
31
32/*
33 * Driver for Sun GEM ethernet controllers.
34 */
35
36#define GEM_DEBUG
37

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

1420gem_add_rxbuf(sc, idx)
1421 struct gem_softc *sc;
1422 int idx;
1423{
1424 struct gem_rxsoft *rxs = &sc->sc_rxsoft[idx];
1425 struct mbuf *m;
1426 int error;
1427
1428 m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
1428 m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
1429 if (m == NULL)
1430 return (ENOBUFS);
1431 m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
1432
1433#ifdef GEM_DEBUG
1434 /* bzero the packet to check dma */
1435 memset(m->m_ext.ext_buf, 0, m->m_ext.ext_size);
1436#endif

--- 448 unchanged lines hidden ---
1429 if (m == NULL)
1430 return (ENOBUFS);
1431 m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
1432
1433#ifdef GEM_DEBUG
1434 /* bzero the packet to check dma */
1435 memset(m->m_ext.ext_buf, 0, m->m_ext.ext_size);
1436#endif

--- 448 unchanged lines hidden ---