From 901b46a2f18f285da4a536422c2e5c04058f3a45 Mon Sep 17 00:00:00 2001 From: jmatthew Date: Fri, 14 Jun 2019 03:40:55 +0000 Subject: Add a barrier after arming a completion queue. If multiple cqs are using the same uar page, these writes could be combined, which would result in a queue not being armed. --- sys/dev/pci/if_mcx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/if_mcx.c') diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index 4cbe246672b..0d46eb4fb64 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.28 2019/06/13 00:37:04 dlg Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.29 2019/06/14 03:40:55 jmatthew Exp $ */ /* * Copyright (c) 2017 David Gwynne @@ -5716,7 +5716,8 @@ mcx_arm_cq(struct mcx_softc *sc, struct mcx_cq *cq) uval |= cq->cq_n; bus_space_write_raw_8(sc->sc_memt, sc->sc_memh, offset + MCX_UAR_CQ_DOORBELL, htobe64(uval)); - /* barrier? */ + mcx_bar(sc, offset + MCX_UAR_CQ_DOORBELL, sizeof(uint64_t), + BUS_SPACE_BARRIER_WRITE); } void -- cgit v1.2.3-59-g8ed1b