From f83830751a2518a5f08fc0e7e2b9b514a77b6c68 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Wed, 16 Aug 2023 18:40:15 +0700 Subject: am7990: rmd3 mcnt is 0 on error --- src/devices/machine/am79c90.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/machine/am79c90.cpp b/src/devices/machine/am79c90.cpp index 55506ba36fd..64b307be688 100644 --- a/src/devices/machine/am79c90.cpp +++ b/src/devices/machine/am79c90.cpp @@ -284,7 +284,7 @@ void am7990_device_base::recv_complete_cb(int result) LOGMASKED(LOG_RXTX, "receive complete rmd1 0x%04x rmd3 %d\n", m_rx_md[1], result & RMD3_MCNT); m_dma_out_cb(ring_address | 2, m_rx_md[1]); - m_dma_out_cb(ring_address | 6, result & RMD3_MCNT); + m_dma_out_cb(ring_address | 6, (m_rx_md[1] & RMD1_ERR) ? 0 : (result & RMD3_MCNT)); // advance the ring m_rx_ring_pos = (m_rx_ring_pos + 1) & m_rx_ring_mask; -- cgit v1.2.3