Deleted Added
full compact
if_cpsw.c (242068) if_cpsw.c (243882)
1/*-
2 * Copyright (c) 2012 Damjan Marion <dmarion@Freebsd.org>
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

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

25 */
26
27/*
28 * TI 3 Port Switch Ethernet (CPSW) Driver
29 * Found in TI8148, AM335x SoCs
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012 Damjan Marion <dmarion@Freebsd.org>
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

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

25 */
26
27/*
28 * TI 3 Port Switch Ethernet (CPSW) Driver
29 * Found in TI8148, AM335x SoCs
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/arm/ti/cpsw/if_cpsw.c 242068 2012-10-25 04:37:47Z kientzle $");
33__FBSDID("$FreeBSD: head/sys/arm/ti/cpsw/if_cpsw.c 243882 2012-12-05 08:04:20Z glebius $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/endian.h>
38#include <sys/mbuf.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/kernel.h>

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

620 /*
621 * Walk packet chain to find last mbuf. We will either
622 * pad there, or append a new mbuf and pad it.
623 */
624 for (last = m; last->m_next != NULL; last = last->m_next)
625 ;
626 if (!(M_WRITABLE(last) && M_TRAILINGSPACE(last) >= padlen)) {
627 /* Allocate new empty mbuf, pad it. Compact later. */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/endian.h>
38#include <sys/mbuf.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/kernel.h>

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

620 /*
621 * Walk packet chain to find last mbuf. We will either
622 * pad there, or append a new mbuf and pad it.
623 */
624 for (last = m; last->m_next != NULL; last = last->m_next)
625 ;
626 if (!(M_WRITABLE(last) && M_TRAILINGSPACE(last) >= padlen)) {
627 /* Allocate new empty mbuf, pad it. Compact later. */
628 MGET(n, M_DONTWAIT, MT_DATA);
628 MGET(n, M_NOWAIT, MT_DATA);
629 if (n == NULL)
630 return (ENOBUFS);
631 n->m_len = 0;
632 last->m_next = n;
633 last = n;
634 }
635 }
636

--- 659 unchanged lines hidden ---
629 if (n == NULL)
630 return (ENOBUFS);
631 n->m_len = 0;
632 last->m_next = n;
633 last = n;
634 }
635 }
636

--- 659 unchanged lines hidden ---