if_ex.c (106937) | if_ex.c (109623) |
---|---|
1/* 2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es) 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 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 1/* 2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es) 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 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/sys/dev/ex/if_ex.c 106937 2002-11-14 23:54:55Z sam $ | 27 * $FreeBSD: head/sys/dev/ex/if_ex.c 109623 2003-01-21 08:56:16Z alfred $ |
28 * 29 * MAINTAINER: Matthew N. Dodd <winter@jurai.net> 30 * <mdodd@FreeBSD.org> 31 */ 32 33/* 34 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver 35 * --- 654 unchanged lines hidden (view full) --- 690 691 while (inw(iobase + IO_PORT_REG) == RCV_Done) { 692 693 rx_status = inw(iobase + IO_PORT_REG); 694 sc->rx_head = inw(iobase + IO_PORT_REG); 695 QQQ = pkt_len = inw(iobase + IO_PORT_REG); 696 697 if (rx_status & RCV_OK_bit) { | 28 * 29 * MAINTAINER: Matthew N. Dodd <winter@jurai.net> 30 * <mdodd@FreeBSD.org> 31 */ 32 33/* 34 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver 35 * --- 654 unchanged lines hidden (view full) --- 690 691 while (inw(iobase + IO_PORT_REG) == RCV_Done) { 692 693 rx_status = inw(iobase + IO_PORT_REG); 694 sc->rx_head = inw(iobase + IO_PORT_REG); 695 QQQ = pkt_len = inw(iobase + IO_PORT_REG); 696 697 if (rx_status & RCV_OK_bit) { |
698 MGETHDR(m, M_DONTWAIT, MT_DATA); | 698 MGETHDR(m, M_NOWAIT, MT_DATA); |
699 ipkt = m; 700 if (ipkt == NULL) { 701 ifp->if_iqdrops++; 702 } else { 703 ipkt->m_pkthdr.rcvif = ifp; 704 ipkt->m_pkthdr.len = pkt_len; 705 ipkt->m_len = MHLEN; 706 707 while (pkt_len > 0) { 708 if (pkt_len > MINCLSIZE) { | 699 ipkt = m; 700 if (ipkt == NULL) { 701 ifp->if_iqdrops++; 702 } else { 703 ipkt->m_pkthdr.rcvif = ifp; 704 ipkt->m_pkthdr.len = pkt_len; 705 ipkt->m_len = MHLEN; 706 707 while (pkt_len > 0) { 708 if (pkt_len > MINCLSIZE) { |
709 MCLGET(m, M_DONTWAIT); | 709 MCLGET(m, M_NOWAIT); |
710 if (m->m_flags & M_EXT) { 711 m->m_len = MCLBYTES; 712 } else { 713 m_freem(ipkt); 714 ifp->if_iqdrops++; 715 goto rx_another; 716 } 717 } --- 8 unchanged lines hidden (view full) --- 726 mtod(m, caddr_t), m->m_len / 2); 727 728 if (m->m_len & 1) { 729 *(mtod(m, caddr_t) + m->m_len - 1) = inb(iobase + IO_PORT_REG); 730 } 731 pkt_len -= m->m_len; 732 733 if (pkt_len > 0) { | 710 if (m->m_flags & M_EXT) { 711 m->m_len = MCLBYTES; 712 } else { 713 m_freem(ipkt); 714 ifp->if_iqdrops++; 715 goto rx_another; 716 } 717 } --- 8 unchanged lines hidden (view full) --- 726 mtod(m, caddr_t), m->m_len / 2); 727 728 if (m->m_len & 1) { 729 *(mtod(m, caddr_t) + m->m_len - 1) = inb(iobase + IO_PORT_REG); 730 } 731 pkt_len -= m->m_len; 732 733 if (pkt_len > 0) { |
734 MGET(m->m_next, M_DONTWAIT, MT_DATA); | 734 MGET(m->m_next, M_NOWAIT, MT_DATA); |
735 if (m->m_next == NULL) { 736 m_freem(ipkt); 737 ifp->if_iqdrops++; 738 goto rx_another; 739 } 740 m = m->m_next; 741 m->m_len = MLEN; 742 } --- 206 unchanged lines hidden --- | 735 if (m->m_next == NULL) { 736 m_freem(ipkt); 737 ifp->if_iqdrops++; 738 goto rx_another; 739 } 740 m = m->m_next; 741 m->m_len = MLEN; 742 } --- 206 unchanged lines hidden --- |