Wed Mar 16 10:08:02 2022 UTC ()
s/watchog/watchdog in comment and log message, one wording fix in comment.


(andvar)
diff -r1.22 -r1.23 src/sys/arch/mips/ralink/ralink_eth.c
diff -r1.50 -r1.51 src/sys/dev/pci/if_jme.c

cvs diff -r1.22 -r1.23 src/sys/arch/mips/ralink/ralink_eth.c (expand / switch to unified diff)

--- src/sys/arch/mips/ralink/ralink_eth.c 2021/08/17 22:00:30 1.22
+++ src/sys/arch/mips/ralink/ralink_eth.c 2022/03/16 10:08:02 1.23

cvs diff -r1.50 -r1.51 src/sys/dev/pci/if_jme.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_jme.c 2021/05/08 00:27:02 1.50
+++ src/sys/dev/pci/if_jme.c 2022/03/16 10:08:02 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_jme.c,v 1.50 2021/05/08 00:27:02 thorpej Exp $ */ 1/* $NetBSD: if_jme.c,v 1.51 2022/03/16 10:08:02 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2008 Manuel Bouyer. All rights reserved. 4 * Copyright (c) 2008 Manuel Bouyer. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -48,27 +48,27 @@ @@ -48,27 +48,27 @@
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE. 51 * SUCH DAMAGE.
52 */ 52 */
53 53
54 54
55/* 55/*
56 * Driver for JMicron Technologies JMC250 (Giganbit) and JMC260 (Fast) 56 * Driver for JMicron Technologies JMC250 (Giganbit) and JMC260 (Fast)
57 * Ethernet Controllers. 57 * Ethernet Controllers.
58 */ 58 */
59 59
60#include <sys/cdefs.h> 60#include <sys/cdefs.h>
61__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.50 2021/05/08 00:27:02 thorpej Exp $"); 61__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.51 2022/03/16 10:08:02 andvar Exp $");
62 62
63 63
64#include <sys/param.h> 64#include <sys/param.h>
65#include <sys/systm.h> 65#include <sys/systm.h>
66#include <sys/mbuf.h> 66#include <sys/mbuf.h>
67#include <sys/protosw.h> 67#include <sys/protosw.h>
68#include <sys/socket.h> 68#include <sys/socket.h>
69#include <sys/ioctl.h> 69#include <sys/ioctl.h>
70#include <sys/errno.h> 70#include <sys/errno.h>
71#include <sys/malloc.h> 71#include <sys/malloc.h>
72#include <sys/kernel.h> 72#include <sys/kernel.h>
73#include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */ 73#include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */
74#include <sys/device.h> 74#include <sys/device.h>
@@ -1604,27 +1604,27 @@ jme_txeof(struct jme_softc *sc) @@ -1604,27 +1604,27 @@ jme_txeof(struct jme_softc *sc)
1604 bus_dmamap_sync(sc->jme_dmatag, sc->jme_txmbufm[cons0], 1604 bus_dmamap_sync(sc->jme_dmatag, sc->jme_txmbufm[cons0],
1605 0, sc->jme_txmbufm[cons0]->dm_mapsize, 1605 0, sc->jme_txmbufm[cons0]->dm_mapsize,
1606 BUS_DMASYNC_POSTWRITE); 1606 BUS_DMASYNC_POSTWRITE);
1607 bus_dmamap_unload(sc->jme_dmatag, sc->jme_txmbufm[cons0]); 1607 bus_dmamap_unload(sc->jme_dmatag, sc->jme_txmbufm[cons0]);
1608 1608
1609 KASSERT(sc->jme_txmbuf[cons0] != NULL); 1609 KASSERT(sc->jme_txmbuf[cons0] != NULL);
1610 m_freem(sc->jme_txmbuf[cons0]); 1610 m_freem(sc->jme_txmbuf[cons0]);
1611 sc->jme_txmbuf[cons0] = NULL; 1611 sc->jme_txmbuf[cons0] = NULL;
1612 sc->jme_tx_cnt -= nsegs + 1; 1612 sc->jme_tx_cnt -= nsegs + 1;
1613 KASSERT(sc->jme_tx_cnt >= 0); 1613 KASSERT(sc->jme_tx_cnt >= 0);
1614 sc->jme_if.if_flags &= ~IFF_OACTIVE; 1614 sc->jme_if.if_flags &= ~IFF_OACTIVE;
1615 } 1615 }
1616 sc->jme_tx_cons = cons; 1616 sc->jme_tx_cons = cons;
1617 /* Unarm watchog timer when there is no pending descriptors in queue. */ 1617 /* Unarm watchdog timer when there are no pending descriptors in queue. */
1618 if (sc->jme_tx_cnt == 0) 1618 if (sc->jme_tx_cnt == 0)
1619 ifp->if_timer = 0; 1619 ifp->if_timer = 0;
1620#ifdef JMEDEBUG_TX 1620#ifdef JMEDEBUG_TX
1621 printf("jme_txeof jme_tx_cnt %d\n", sc->jme_tx_cnt); 1621 printf("jme_txeof jme_tx_cnt %d\n", sc->jme_tx_cnt);
1622#endif 1622#endif
1623} 1623}
1624 1624
1625static void 1625static void
1626jme_ifstart(struct ifnet *ifp) 1626jme_ifstart(struct ifnet *ifp)
1627{ 1627{
1628 jme_softc_t *sc = ifp->if_softc; 1628 jme_softc_t *sc = ifp->if_softc;
1629 struct mbuf *mb_head; 1629 struct mbuf *mb_head;
1630 int enq; 1630 int enq;