if_pcn.c (110572) | if_pcn.c (111119) |
---|---|
1/* 2 * Copyright (c) 2000 Berkeley Software Design, Inc. 3 * Copyright (c) 1997, 1998, 1999, 2000 4 * Bill Paul <wpaul@osd.bsdi.com>. 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: --- 16 unchanged lines hidden (view full) --- 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 2000 Berkeley Software Design, Inc. 3 * Copyright (c) 1997, 1998, 1999, 2000 4 * Bill Paul <wpaul@osd.bsdi.com>. 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: --- 16 unchanged lines hidden (view full) --- 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/pci/if_pcn.c 110572 2003-02-08 21:06:03Z mdodd $ | 33 * $FreeBSD: head/sys/pci/if_pcn.c 111119 2003-02-19 05:47:46Z imp $ |
34 */ 35 36/* 37 * AMD Am79c972 fast ethernet PCI NIC driver. Datatheets are available 38 * from http://www.amd.com. 39 * 40 * Written by Bill Paul <wpaul@osd.bsdi.com> 41 */ --- 50 unchanged lines hidden (view full) --- 92 93MODULE_DEPEND(pcn, miibus, 1, 1, 1); 94 95/* "controller miibus0" required. See GENERIC if you get errors here. */ 96#include "miibus_if.h" 97 98#ifndef lint 99static const char rcsid[] = | 34 */ 35 36/* 37 * AMD Am79c972 fast ethernet PCI NIC driver. Datatheets are available 38 * from http://www.amd.com. 39 * 40 * Written by Bill Paul <wpaul@osd.bsdi.com> 41 */ --- 50 unchanged lines hidden (view full) --- 92 93MODULE_DEPEND(pcn, miibus, 1, 1, 1); 94 95/* "controller miibus0" required. See GENERIC if you get errors here. */ 96#include "miibus_if.h" 97 98#ifndef lint 99static const char rcsid[] = |
100 "$FreeBSD: head/sys/pci/if_pcn.c 110572 2003-02-08 21:06:03Z mdodd $"; | 100 "$FreeBSD: head/sys/pci/if_pcn.c 111119 2003-02-19 05:47:46Z imp $"; |
101#endif 102 103/* 104 * Various supported device vendors/types and their names. 105 */ 106static struct pcn_type pcn_devs[] = { 107 { PCN_VENDORID, PCN_DEVICEID_PCNET, "AMD PCnet/PCI 10/100BaseTX" }, 108 { PCN_VENDORID, PCN_DEVICEID_HOME, "AMD PCnet/Home HomePNA" }, --- 661 unchanged lines hidden (view full) --- 770 struct mbuf *m; 771{ 772 struct mbuf *m_new = NULL; 773 struct pcn_rx_desc *c; 774 775 c = &sc->pcn_ldata->pcn_rx_list[idx]; 776 777 if (m == NULL) { | 101#endif 102 103/* 104 * Various supported device vendors/types and their names. 105 */ 106static struct pcn_type pcn_devs[] = { 107 { PCN_VENDORID, PCN_DEVICEID_PCNET, "AMD PCnet/PCI 10/100BaseTX" }, 108 { PCN_VENDORID, PCN_DEVICEID_HOME, "AMD PCnet/Home HomePNA" }, --- 661 unchanged lines hidden (view full) --- 770 struct mbuf *m; 771{ 772 struct mbuf *m_new = NULL; 773 struct pcn_rx_desc *c; 774 775 c = &sc->pcn_ldata->pcn_rx_list[idx]; 776 777 if (m == NULL) { |
778 MGETHDR(m_new, M_NOWAIT, MT_DATA); | 778 MGETHDR(m_new, M_DONTWAIT, MT_DATA); |
779 if (m_new == NULL) 780 return(ENOBUFS); 781 | 779 if (m_new == NULL) 780 return(ENOBUFS); 781 |
782 MCLGET(m_new, M_NOWAIT); | 782 MCLGET(m_new, M_DONTWAIT); |
783 if (!(m_new->m_flags & M_EXT)) { 784 m_freem(m_new); 785 return(ENOBUFS); 786 } 787 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; 788 } else { 789 m_new = m; 790 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; --- 672 unchanged lines hidden --- | 783 if (!(m_new->m_flags & M_EXT)) { 784 m_freem(m_new); 785 return(ENOBUFS); 786 } 787 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; 788 } else { 789 m_new = m; 790 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; --- 672 unchanged lines hidden --- |