Module Name: src Committed By: ryo Date: Wed Aug 24 03:03:59 UTC 2022
Modified Files: src/sys/dev/ic: dwc_eqos.c Log Message: Giving up adjusting ETHER_ALIGN. Even if the jumbo frame setting is off, eqos will DMA transfer frames of 2048 bytes or more in increments of 2048 bytes if they are received. If the start position of the mbuf data is shifted by ETHER_ALIGN bytes in m_adj(), up to 2048 bytes of data will be written from the +ETHER_ALIGN position, causing overflow of the mbuf cluster. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.10 src/sys/dev/ic/dwc_eqos.c:1.11 --- src/sys/dev/ic/dwc_eqos.c:1.10 Tue Aug 23 05:41:46 2022 +++ src/sys/dev/ic/dwc_eqos.c Wed Aug 24 03:03:58 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos.c,v 1.10 2022/08/23 05:41:46 ryo Exp $ */ +/* $NetBSD: dwc_eqos.c,v 1.11 2022/08/24 03:03:58 ryo Exp $ */ /*- * Copyright (c) 2022 Jared McNeill <jmcne...@invisible.ca> @@ -33,7 +33,7 @@ #include "opt_net_mpsafe.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.10 2022/08/23 05:41:46 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.11 2022/08/24 03:03:58 ryo Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -365,8 +365,6 @@ eqos_setup_rxbuf(struct eqos_softc *sc, { int error; - m_adj(m, ETHER_ALIGN); - error = bus_dmamap_load_mbuf(sc->sc_dmat, sc->sc_rx.buf_map[index].map, m, BUS_DMA_READ | BUS_DMA_NOWAIT); if (error != 0)