Deleted Added
full compact
if_cs.c (106937) if_cs.c (109623)
1/*
2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
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

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

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 */
28
29/*
1/*
2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
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

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

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 */
28
29/*
30 * $FreeBSD: head/sys/dev/cs/if_cs.c 106937 2002-11-14 23:54:55Z sam $
30 * $FreeBSD: head/sys/dev/cs/if_cs.c 109623 2003-01-21 08:56:16Z alfred $
31 *
32 * Device driver for Crystal Semiconductor CS8920 based ethernet
33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
34 */
35
36/*
37#define CS_DEBUG
38 */

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

775 if (!(status & RX_OK)) {
776#ifdef CS_DEBUG
777 if_printf(ifp, "bad pkt stat %x\n", status);
778#endif
779 ifp->if_ierrors++;
780 return -1;
781 }
782
31 *
32 * Device driver for Crystal Semiconductor CS8920 based ethernet
33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
34 */
35
36/*
37#define CS_DEBUG
38 */

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

775 if (!(status & RX_OK)) {
776#ifdef CS_DEBUG
777 if_printf(ifp, "bad pkt stat %x\n", status);
778#endif
779 ifp->if_ierrors++;
780 return -1;
781 }
782
783 MGETHDR(m, M_DONTWAIT, MT_DATA);
783 MGETHDR(m, M_NOWAIT, MT_DATA);
784 if (m==NULL)
785 return -1;
786
787 if (length > MHLEN) {
784 if (m==NULL)
785 return -1;
786
787 if (length > MHLEN) {
788 MCLGET(m, M_DONTWAIT);
788 MCLGET(m, M_NOWAIT);
789 if (!(m->m_flags & M_EXT)) {
790 m_freem(m);
791 return -1;
792 }
793 }
794
795 /* Initialize packet's header info */
796 m->m_pkthdr.rcvif = ifp;

--- 443 unchanged lines hidden ---
789 if (!(m->m_flags & M_EXT)) {
790 m_freem(m);
791 return -1;
792 }
793 }
794
795 /* Initialize packet's header info */
796 m->m_pkthdr.rcvif = ifp;

--- 443 unchanged lines hidden ---