[rtems-libbsd commit] if_dwc: Invalidate read buffer again

Sebastian Huber sebh at rtems.org
Tue Jan 10 10:06:12 UTC 2017


Module:    rtems-libbsd
Branch:    master
Commit:    2360b084ff309183fbcb303fde7f5ea3e61f72e5
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=2360b084ff309183fbcb303fde7f5ea3e61f72e5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Sep  7 08:33:16 2015 +0200

if_dwc: Invalidate read buffer again

This may prevent problems in case a cache line prefetch added some lines
to the cache during a DMA transfer.

---

 freebsd/sys/dev/dwc/if_dwc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/freebsd/sys/dev/dwc/if_dwc.c b/freebsd/sys/dev/dwc/if_dwc.c
index cd1f217..d62dc8d 100644
--- a/freebsd/sys/dev/dwc/if_dwc.c
+++ b/freebsd/sys/dev/dwc/if_dwc.c
@@ -925,6 +925,9 @@ dwc_rxfinish_locked(struct dwc_softc *sc)
 			/* Remove trailing FCS */
 			m_adj(m, -ETHER_CRC_LEN);
 
+#ifdef __rtems__
+			rtems_cache_invalidate_multiple_data_lines(m->m_data, m->m_len);
+#endif /* __rtems__ */
 			DWC_UNLOCK(sc);
 			(*ifp->if_input)(ifp, m);
 			DWC_LOCK(sc);



More information about the vc mailing list