Deleted Added
full compact
if_xe.c (109058) if_xe.c (109623)
1/*-
2 * Copyright (c) 1998, 1999 Scott Mitchell
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

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

19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: if_xe.c,v 1.20 1999/06/13 19:17:40 scott Exp $
1/*-
2 * Copyright (c) 1998, 1999 Scott Mitchell
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

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

19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: if_xe.c,v 1.20 1999/06/13 19:17:40 scott Exp $
27 * $FreeBSD: head/sys/dev/xe/if_xe.c 109058 2003-01-10 08:09:58Z mbr $
27 * $FreeBSD: head/sys/dev/xe/if_xe.c 109623 2003-01-21 08:56:16Z alfred $
28 */
29
30/*
31 * XXX TODO XXX
32 *
33 * I've pushed this fairly far, but there are some things that need to be
34 * done here. I'm documenting them here in case I get destracted. -- imp
35 *

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

638 XE_OUTW(XE_DO, 0x8000);
639 continue;
640 }
641#endif
642
643 if (len & 0x01)
644 len++;
645
28 */
29
30/*
31 * XXX TODO XXX
32 *
33 * I've pushed this fairly far, but there are some things that need to be
34 * done here. I'm documenting them here in case I get destracted. -- imp
35 *

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

638 XE_OUTW(XE_DO, 0x8000);
639 continue;
640 }
641#endif
642
643 if (len & 0x01)
644 len++;
645
646 MGETHDR(mbp, M_DONTWAIT, MT_DATA); /* Allocate a header mbuf */
646 MGETHDR(mbp, M_NOWAIT, MT_DATA); /* Allocate a header mbuf */
647 if (mbp != NULL) {
648 mbp->m_pkthdr.rcvif = ifp;
649 mbp->m_pkthdr.len = mbp->m_len = len;
650
651 /*
652 * If the mbuf header isn't big enough for the packet, attach an
653 * mbuf cluster to hold it. The +2 is to allow for the nasty little
654 * alignment hack below.
655 */
656 if (len + 2 > MHLEN) {
647 if (mbp != NULL) {
648 mbp->m_pkthdr.rcvif = ifp;
649 mbp->m_pkthdr.len = mbp->m_len = len;
650
651 /*
652 * If the mbuf header isn't big enough for the packet, attach an
653 * mbuf cluster to hold it. The +2 is to allow for the nasty little
654 * alignment hack below.
655 */
656 if (len + 2 > MHLEN) {
657 MCLGET(mbp, M_DONTWAIT);
657 MCLGET(mbp, M_NOWAIT);
658 if ((mbp->m_flags & M_EXT) == 0) {
659 m_freem(mbp);
660 mbp = NULL;
661 }
662 }
663 }
664
665 if (mbp != NULL) {

--- 1269 unchanged lines hidden ---
658 if ((mbp->m_flags & M_EXT) == 0) {
659 m_freem(mbp);
660 mbp = NULL;
661 }
662 }
663 }
664
665 if (mbp != NULL) {

--- 1269 unchanged lines hidden ---