diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2019-06-14 03:40:56 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2019-06-14 03:40:56 +0000 |
commit | fad06245ffdd99beecf41ce7e269365e52f6c909 (patch) | |
tree | a89d9ed167b053b9ca3da45e1686cdf0665fc360 /sys/dev/pci | |
parent | 722b10b5a25dd8d31060c85c1e0f86e7b9748feb (diff) |
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.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_mcx.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <dlg@openbsd.org> @@ -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 |