Deleted Added
full compact
if_fxp.c (106937) if_fxp.c (109623)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * 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:

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * 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:

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/fxp/if_fxp.c 106937 2002-11-14 23:54:55Z sam $
28 * $FreeBSD: head/sys/dev/fxp/if_fxp.c 109623 2003-01-21 08:56:16Z alfred $
29 */
30
31/*
32 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>

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

1063 if (m != NULL) {
1064 struct mbuf *mn;
1065
1066 /*
1067 * We ran out of segments. We have to recopy this
1068 * mbuf chain first. Bail out if we can't get the
1069 * new buffers.
1070 */
29 */
30
31/*
32 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>

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

1063 if (m != NULL) {
1064 struct mbuf *mn;
1065
1066 /*
1067 * We ran out of segments. We have to recopy this
1068 * mbuf chain first. Bail out if we can't get the
1069 * new buffers.
1070 */
1071 MGETHDR(mn, M_DONTWAIT, MT_DATA);
1071 MGETHDR(mn, M_NOWAIT, MT_DATA);
1072 if (mn == NULL) {
1073 m_freem(mb_head);
1074 break;
1075 }
1076 if (mb_head->m_pkthdr.len > MHLEN) {
1072 if (mn == NULL) {
1073 m_freem(mb_head);
1074 break;
1075 }
1076 if (mb_head->m_pkthdr.len > MHLEN) {
1077 MCLGET(mn, M_DONTWAIT);
1077 MCLGET(mn, M_NOWAIT);
1078 if ((mn->m_flags & M_EXT) == 0) {
1079 m_freem(mn);
1080 m_freem(mb_head);
1081 break;
1082 }
1083 }
1084 m_copydata(mb_head, 0, mb_head->m_pkthdr.len,
1085 mtod(mn, caddr_t));

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

1867 */
1868static int
1869fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
1870{
1871 u_int32_t v;
1872 struct mbuf *m;
1873 struct fxp_rfa *rfa, *p_rfa;
1874
1078 if ((mn->m_flags & M_EXT) == 0) {
1079 m_freem(mn);
1080 m_freem(mb_head);
1081 break;
1082 }
1083 }
1084 m_copydata(mb_head, 0, mb_head->m_pkthdr.len,
1085 mtod(mn, caddr_t));

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

1867 */
1868static int
1869fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
1870{
1871 u_int32_t v;
1872 struct mbuf *m;
1873 struct fxp_rfa *rfa, *p_rfa;
1874
1875 m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
1875 m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
1876 if (m == NULL) { /* try to recycle the old mbuf instead */
1877 if (oldm == NULL)
1878 return 1;
1879 m = oldm;
1880 m->m_data = m->m_ext.ext_buf;
1881 }
1882
1883 /*

--- 391 unchanged lines hidden ---
1876 if (m == NULL) { /* try to recycle the old mbuf instead */
1877 if (oldm == NULL)
1878 return 1;
1879 m = oldm;
1880 m->m_data = m->m_ext.ext_buf;
1881 }
1882
1883 /*

--- 391 unchanged lines hidden ---