On Tue, Sep 22, 2026 at 04:17:55PM +0200, BESSOT Jean-Michel wrote:
> Hello
> 
> I do not have network this time but it pass most of the time with those
> errors in dmesg.
> 
> Sorry for the bug, i send the dmesg.
> 
> Bye
> 

Can you please try this patch and let me know whether it helps?

See https://lore.kernel.org/lkml/[email protected]/

M  sys/dev/ic/qwx.c  |  7+  6-

1 file changed, 7 insertions(+), 6 deletions(-)

commit - 37e1413d351ba93bef8686ca531e826712a1b8c4
commit + 01d8ed3c39b943a31572e2f399b0be295e3094f2
blob - f0483d385f461ec6b982d3b34b847b1cb8214ce5
blob + b039393a3783b7b2186c4a476d537cc8c43dacbc
--- sys/dev/ic/qwx.c
+++ sys/dev/ic/qwx.c
@@ -9816,7 +9816,7 @@ qwx_hal_srng_access_begin(struct qwx_softc *sc, struct
                        *(volatile uint32_t *)srng->u.src_ring.tp_addr;
        } else {
                srng->u.dst_ring.cached_hp =
-                       *(volatile uint32_t *)srng->u.dst_ring.hp_addr;
+                       READ_ONCE(*srng->u.dst_ring.hp_addr);
        }
 }
 
@@ -21829,7 +21829,8 @@ qwx_hal_ce_dst_status_get_length(void *buf)
                (struct hal_ce_srng_dst_status_desc *)buf;
        uint32_t len;
 
-       len = FIELD_GET(HAL_CE_DST_STATUS_DESC_FLAGS_LEN, desc->flags);
+       len = FIELD_GET(HAL_CE_DST_STATUS_DESC_FLAGS_LEN,
+           READ_ONCE(desc->flags));
        desc->flags &= ~HAL_CE_DST_STATUS_DESC_FLAGS_LEN;
 
        return len;
@@ -23016,11 +23017,11 @@ qwx_ce_completed_recv_next(struct qwx_ce_pipe *pipe,
                goto err;
        }
 
+       /* Make sure descriptor is read after the head pointer. */
+       bus_dmamap_sync(sc->sc_dmat, QWX_DMA_MAP(sc->hal.rdpmem), 0,
+           QWX_DMA_LEN(sc->hal.rdpmem), BUS_DMASYNC_POSTREAD);
+
        *nbytes = qwx_hal_ce_dst_status_get_length(desc);
-       if (*nbytes == 0) {
-               ret = EIO;
-               goto err;
-       }
 
        if (per_transfer_contextp) {
                *per_transfer_contextp =

Reply via email to