Deleted Added
full compact
if_tl.c (109623) if_tl.c (111119)
1/*
2 * Copyright (c) 1997, 1998
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1997, 1998
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/pci/if_tl.c 109623 2003-01-21 08:56:16Z alfred $
32 * $FreeBSD: head/sys/pci/if_tl.c 111119 2003-02-19 05:47:46Z imp $
33 */
34
35/*
36 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x.
37 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller,
38 * the National Semiconductor DP83840A physical interface and the
39 * Microchip Technology 24Cxx series serial EEPROM.
40 *

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

220
221MODULE_DEPEND(tl, miibus, 1, 1, 1);
222
223/* "controller miibus0" required. See GENERIC if you get errors here. */
224#include "miibus_if.h"
225
226#if !defined(lint)
227static const char rcsid[] =
33 */
34
35/*
36 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x.
37 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller,
38 * the National Semiconductor DP83840A physical interface and the
39 * Microchip Technology 24Cxx series serial EEPROM.
40 *

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

220
221MODULE_DEPEND(tl, miibus, 1, 1, 1);
222
223/* "controller miibus0" required. See GENERIC if you get errors here. */
224#include "miibus_if.h"
225
226#if !defined(lint)
227static const char rcsid[] =
228 "$FreeBSD: head/sys/pci/if_tl.c 109623 2003-01-21 08:56:16Z alfred $";
228 "$FreeBSD: head/sys/pci/if_tl.c 111119 2003-02-19 05:47:46Z imp $";
229#endif
230
231/*
232 * Various supported device vendors/types and their names.
233 */
234
235static struct tl_type tl_devs[] = {
236 { TI_VENDORID, TI_DEVICEID_THUNDERLAN,

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

1454
1455static int
1456tl_newbuf(sc, c)
1457 struct tl_softc *sc;
1458 struct tl_chain_onefrag *c;
1459{
1460 struct mbuf *m_new = NULL;
1461
229#endif
230
231/*
232 * Various supported device vendors/types and their names.
233 */
234
235static struct tl_type tl_devs[] = {
236 { TI_VENDORID, TI_DEVICEID_THUNDERLAN,

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

1454
1455static int
1456tl_newbuf(sc, c)
1457 struct tl_softc *sc;
1458 struct tl_chain_onefrag *c;
1459{
1460 struct mbuf *m_new = NULL;
1461
1462 MGETHDR(m_new, M_NOWAIT, MT_DATA);
1462 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
1463 if (m_new == NULL)
1464 return(ENOBUFS);
1465
1463 if (m_new == NULL)
1464 return(ENOBUFS);
1465
1466 MCLGET(m_new, M_NOWAIT);
1466 MCLGET(m_new, M_DONTWAIT);
1467 if (!(m_new->m_flags & M_EXT)) {
1468 m_freem(m_new);
1469 return(ENOBUFS);
1470 }
1471
1472#ifdef __alpha__
1473 m_new->m_data += 2;
1474#endif

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

1904 * data into an mbuf cluster. Note that we don't
1905 * bother clearing the values in the other fragment
1906 * pointers/counters; it wouldn't gain us anything,
1907 * and would waste cycles.
1908 */
1909 if (m != NULL) {
1910 struct mbuf *m_new = NULL;
1911
1467 if (!(m_new->m_flags & M_EXT)) {
1468 m_freem(m_new);
1469 return(ENOBUFS);
1470 }
1471
1472#ifdef __alpha__
1473 m_new->m_data += 2;
1474#endif

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

1904 * data into an mbuf cluster. Note that we don't
1905 * bother clearing the values in the other fragment
1906 * pointers/counters; it wouldn't gain us anything,
1907 * and would waste cycles.
1908 */
1909 if (m != NULL) {
1910 struct mbuf *m_new = NULL;
1911
1912 MGETHDR(m_new, M_NOWAIT, MT_DATA);
1912 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
1913 if (m_new == NULL) {
1914 if_printf(ifp, "no memory for tx list\n");
1915 return(1);
1916 }
1917 if (m_head->m_pkthdr.len > MHLEN) {
1913 if (m_new == NULL) {
1914 if_printf(ifp, "no memory for tx list\n");
1915 return(1);
1916 }
1917 if (m_head->m_pkthdr.len > MHLEN) {
1918 MCLGET(m_new, M_NOWAIT);
1918 MCLGET(m_new, M_DONTWAIT);
1919 if (!(m_new->m_flags & M_EXT)) {
1920 m_freem(m_new);
1921 if_printf(ifp, "no memory for tx list\n");
1922 return(1);
1923 }
1924 }
1925 m_copydata(m_head, 0, m_head->m_pkthdr.len,
1926 mtod(m_new, caddr_t));

--- 439 unchanged lines hidden ---
1919 if (!(m_new->m_flags & M_EXT)) {
1920 m_freem(m_new);
1921 if_printf(ifp, "no memory for tx list\n");
1922 return(1);
1923 }
1924 }
1925 m_copydata(m_head, 0, m_head->m_pkthdr.len,
1926 mtod(m_new, caddr_t));

--- 439 unchanged lines hidden ---