Module Name: src Committed By: msaitoh Date: Mon Oct 23 15:11:48 UTC 2023
Modified Files: src/sys/dev/ic: dwc_eqos.c Log Message: eqos(4): Add and modify some DPRINTF()s. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/dwc_eqos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/dwc_eqos.c diff -u src/sys/dev/ic/dwc_eqos.c:1.23 src/sys/dev/ic/dwc_eqos.c:1.24 --- src/sys/dev/ic/dwc_eqos.c:1.23 Mon Oct 23 14:54:53 2023 +++ src/sys/dev/ic/dwc_eqos.c Mon Oct 23 15:11:47 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos.c,v 1.23 2023/10/23 14:54:53 msaitoh Exp $ */ +/* $NetBSD: dwc_eqos.c,v 1.24 2023/10/23 15:11:47 msaitoh Exp $ */ /*- * Copyright (c) 2022 Jared McNeill <jmcne...@invisible.ca> @@ -38,7 +38,7 @@ #include "opt_net_mpsafe.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.23 2023/10/23 14:54:53 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.24 2023/10/23 15:11:47 msaitoh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -257,6 +257,8 @@ eqos_setup_txdesc(struct eqos_softc *sc, { uint32_t tdes2, tdes3; + DPRINTF(EDEB_TXRING, "preparing desc %u\n", index); + if (paddr == 0 || len == 0) { DPRINTF(EDEB_TXRING, "tx for desc %u done!\n", index); @@ -278,7 +280,6 @@ eqos_setup_txdesc(struct eqos_softc *sc, = htole32((uint32_t)((uint64_t)paddr >> 32)); sc->sc_tx.desc_ring[index].tdes2 = htole32(tdes2 | len); sc->sc_tx.desc_ring[index].tdes3 = htole32(tdes3 | total_len); - DPRINTF(EDEB_TXRING, "preparing desc %u\n", index); } static int @@ -289,6 +290,8 @@ eqos_setup_txbuf(struct eqos_softc *sc, uint32_t flags; bool nospace; + DPRINTF(EDEB_TXRING, "preparing desc %u\n", index); + /* at least one descriptor free ? */ if (sc->sc_tx.queued >= TX_DESC_COUNT - 1) return -1; @@ -358,6 +361,8 @@ static void eqos_setup_rxdesc(struct eqos_softc *sc, int index, bus_addr_t paddr) { + DPRINTF(EDEB_RXRING, "preparing desc %u\n", index); + sc->sc_rx.desc_ring[index].tdes0 = htole32((uint32_t)paddr); sc->sc_rx.desc_ring[index].tdes1 = htole32((uint32_t)((uint64_t)paddr >> 32)); @@ -374,6 +379,8 @@ eqos_setup_rxbuf(struct eqos_softc *sc, { int error; + DPRINTF(EDEB_RXRING, "preparing desc %u\n", index); + #if MCLBYTES >= (EQOS_RXDMA_SIZE + ETHER_ALIGN) m_adj(m, ETHER_ALIGN); #endif @@ -886,6 +893,8 @@ eqos_rxintr(struct eqos_softc *sc, int q sc->sc_rx_receiving_m = m0; sc->sc_rx_receiving_m_last = mprev; + DPRINTF(EDEB_RXRING, "sc_rx.cur %u -> %u\n", + sc->sc_rx.cur, index); sc->sc_rx.cur = index; if (pkts != 0) {