pdq_ifsubr.c (106937) | pdq_ifsubr.c (109623) |
---|---|
1/* $NetBSD: pdq_ifsubr.c,v 1.38 2001/12/21 23:21:47 matt Exp $ */ 2 3/*- 4 * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 10 unchanged lines hidden (view full) --- 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * $NetBSD: pdq_ifsubr.c,v 1.12 1997/06/05 01:56:35 thomas Exp$ | 1/* $NetBSD: pdq_ifsubr.c,v 1.38 2001/12/21 23:21:47 matt Exp $ */ 2 3/*- 4 * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 10 unchanged lines hidden (view full) --- 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * $NetBSD: pdq_ifsubr.c,v 1.12 1997/06/05 01:56:35 thomas Exp$ |
27 * $FreeBSD: head/sys/dev/pdq/pdq_ifsubr.c 106937 2002-11-14 23:54:55Z sam $ | 27 * $FreeBSD: head/sys/dev/pdq/pdq_ifsubr.c 109623 2003-01-21 08:56:16Z alfred $ |
28 */ 29 30/* 31 * DEC PDQ FDDI Controller; code for BSD derived operating systems 32 * 33 * This module provide bus independent BSD specific O/S functions. 34 * (ie. it provides an ifnet interface to the rest of the system) 35 */ --- 662 unchanged lines hidden (view full) --- 698 699extern struct mbuf * 700pdq_os_databuf_alloc( 701 pdq_os_ctx_t *sc) 702{ 703 struct mbuf *m; 704 bus_dmamap_t map; 705 | 28 */ 29 30/* 31 * DEC PDQ FDDI Controller; code for BSD derived operating systems 32 * 33 * This module provide bus independent BSD specific O/S functions. 34 * (ie. it provides an ifnet interface to the rest of the system) 35 */ --- 662 unchanged lines hidden (view full) --- 698 699extern struct mbuf * 700pdq_os_databuf_alloc( 701 pdq_os_ctx_t *sc) 702{ 703 struct mbuf *m; 704 bus_dmamap_t map; 705 |
706 MGETHDR(m, M_DONTWAIT, MT_DATA); | 706 MGETHDR(m, M_NOWAIT, MT_DATA); |
707 if (m == NULL) { 708 printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname); 709 return NULL; 710 } | 707 if (m == NULL) { 708 printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname); 709 return NULL; 710 } |
711 MCLGET(m, M_DONTWAIT); | 711 MCLGET(m, M_NOWAIT); |
712 if ((m->m_flags & M_EXT) == 0) { 713 printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname); 714 m_free(m); 715 return NULL; 716 } 717 m->m_pkthdr.len = m->m_len = PDQ_OS_DATABUF_SIZE; 718 719 if (bus_dmamap_create(sc->sc_dmatag, PDQ_OS_DATABUF_SIZE, --- 17 unchanged lines hidden --- | 712 if ((m->m_flags & M_EXT) == 0) { 713 printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname); 714 m_free(m); 715 return NULL; 716 } 717 m->m_pkthdr.len = m->m_len = PDQ_OS_DATABUF_SIZE; 718 719 if (bus_dmamap_create(sc->sc_dmatag, PDQ_OS_DATABUF_SIZE, --- 17 unchanged lines hidden --- |