Wed Jan 29 21:11:39 2020 UTC ()
compile without INET


(christos)
diff -r1.125 -r1.126 src/sys/dev/ic/gem.c

cvs diff -r1.125 -r1.126 src/sys/dev/ic/gem.c (expand / switch to unified diff)

--- src/sys/dev/ic/gem.c 2020/01/29 14:47:08 1.125
+++ src/sys/dev/ic/gem.c 2020/01/29 21:11:38 1.126
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: gem.c,v 1.125 2020/01/29 14:47:08 thorpej Exp $ */ 1/* $NetBSD: gem.c,v 1.126 2020/01/29 21:11:38 christos Exp $ */
2 2
3/* 3/*
4 * 4 *
5 * Copyright (C) 2001 Eduardo Horvath. 5 * Copyright (C) 2001 Eduardo Horvath.
6 * Copyright (c) 2001-2003 Thomas Moestl 6 * Copyright (c) 2001-2003 Thomas Moestl
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 * 30 *
31 */ 31 */
32 32
33/* 33/*
34 * Driver for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers 34 * Driver for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers
35 * See `GEM Gigabit Ethernet ASIC Specification' 35 * See `GEM Gigabit Ethernet ASIC Specification'
36 * http://www.sun.com/processors/manuals/ge.pdf 36 * http://www.sun.com/processors/manuals/ge.pdf
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.125 2020/01/29 14:47:08 thorpej Exp $"); 40__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.126 2020/01/29 21:11:38 christos Exp $");
41 41
42#include "opt_inet.h" 42#include "opt_inet.h"
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/callout.h> 46#include <sys/callout.h>
47#include <sys/mbuf.h> 47#include <sys/mbuf.h>
48#include <sys/syslog.h> 48#include <sys/syslog.h>
49#include <sys/malloc.h> 49#include <sys/malloc.h>
50#include <sys/kernel.h> 50#include <sys/kernel.h>
51#include <sys/socket.h> 51#include <sys/socket.h>
52#include <sys/ioctl.h> 52#include <sys/ioctl.h>
53#include <sys/errno.h> 53#include <sys/errno.h>
@@ -1378,27 +1378,29 @@ gem_start(struct ifnet *ifp) @@ -1378,27 +1378,29 @@ gem_start(struct ifnet *ifp)
1378 ofree = sc->sc_txfree; 1378 ofree = sc->sc_txfree;
1379#ifdef GEM_DEBUG 1379#ifdef GEM_DEBUG
1380 otxnext = sc->sc_txnext; 1380 otxnext = sc->sc_txnext;
1381#endif 1381#endif
1382 1382
1383 DPRINTF(sc, ("%s: gem_start: txfree %d, txnext %d\n", 1383 DPRINTF(sc, ("%s: gem_start: txfree %d, txnext %d\n",
1384 device_xname(sc->sc_dev), ofree, otxnext)); 1384 device_xname(sc->sc_dev), ofree, otxnext));
1385 1385
1386 /* 1386 /*
1387 * Loop through the send queue, setting up transmit descriptors 1387 * Loop through the send queue, setting up transmit descriptors
1388 * until we drain the queue, or use up all available transmit 1388 * until we drain the queue, or use up all available transmit
1389 * descriptors. 1389 * descriptors.
1390 */ 1390 */
 1391#ifdef INET
1391next: 1392next:
 1393#endif
1392 while ((txs = SIMPLEQ_FIRST(&sc->sc_txfreeq)) != NULL && 1394 while ((txs = SIMPLEQ_FIRST(&sc->sc_txfreeq)) != NULL &&
1393 sc->sc_txfree != 0) { 1395 sc->sc_txfree != 0) {
1394 /* 1396 /*
1395 * Grab a packet off the queue. 1397 * Grab a packet off the queue.
1396 */ 1398 */
1397 IFQ_POLL(&ifp->if_snd, m0); 1399 IFQ_POLL(&ifp->if_snd, m0);
1398 if (m0 == NULL) 1400 if (m0 == NULL)
1399 break; 1401 break;
1400 m = NULL; 1402 m = NULL;
1401 1403
1402 dmamap = txs->txs_dmamap; 1404 dmamap = txs->txs_dmamap;
1403 1405
1404 /* 1406 /*