Deleted Added
full compact
if_sn.c (106937) if_sn.c (109623)
1/*
2 * Copyright (c) 1996 Gardner Buchanan <gbuchanan@shl.com>
3 * 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

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

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
1/*
2 * Copyright (c) 1996 Gardner Buchanan <gbuchanan@shl.com>
3 * 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

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

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $FreeBSD: head/sys/dev/sn/if_sn.c 106937 2002-11-14 23:54:55Z sam $
31 * $FreeBSD: head/sys/dev/sn/if_sn.c 109623 2003-01-21 08:56:16Z alfred $
32 */
33
34/*
35 * This is a driver for SMC's 9000 series of Ethernet adapters.
36 *
37 * This FreeBSD driver is derived from the smc9194 Linux driver by
38 * Erik Stahlman and is Copyright (C) 1996 by Erik Stahlman.
39 * This driver also shamelessly borrows from the FreeBSD ep driver

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

1052 * Adjust for odd-length packet.
1053 */
1054 if (status & RS_ODDFRAME)
1055 packet_length++;
1056
1057 /*
1058 * Allocate a header mbuf from the kernel.
1059 */
32 */
33
34/*
35 * This is a driver for SMC's 9000 series of Ethernet adapters.
36 *
37 * This FreeBSD driver is derived from the smc9194 Linux driver by
38 * Erik Stahlman and is Copyright (C) 1996 by Erik Stahlman.
39 * This driver also shamelessly borrows from the FreeBSD ep driver

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

1052 * Adjust for odd-length packet.
1053 */
1054 if (status & RS_ODDFRAME)
1055 packet_length++;
1056
1057 /*
1058 * Allocate a header mbuf from the kernel.
1059 */
1060 MGETHDR(m, M_DONTWAIT, MT_DATA);
1060 MGETHDR(m, M_NOWAIT, MT_DATA);
1061 if (m == NULL)
1062 goto out;
1063
1064 m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
1065 m->m_pkthdr.len = m->m_len = packet_length;
1066
1067 /*
1068 * Attach an mbuf cluster
1069 */
1061 if (m == NULL)
1062 goto out;
1063
1064 m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
1065 m->m_pkthdr.len = m->m_len = packet_length;
1066
1067 /*
1068 * Attach an mbuf cluster
1069 */
1070 MCLGET(m, M_DONTWAIT);
1070 MCLGET(m, M_NOWAIT);
1071
1072 /*
1073 * Insist on getting a cluster
1074 */
1075 if ((m->m_flags & M_EXT) == 0) {
1076 m_freem(m);
1077 ++sc->arpcom.ac_if.if_ierrors;
1078 printf("sn: snread() kernel memory allocation problem\n");

--- 400 unchanged lines hidden ---
1071
1072 /*
1073 * Insist on getting a cluster
1074 */
1075 if ((m->m_flags & M_EXT) == 0) {
1076 m_freem(m);
1077 ++sc->arpcom.ac_if.if_ierrors;
1078 printf("sn: snread() kernel memory allocation problem\n");

--- 400 unchanged lines hidden ---