summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2020-10-28 07:09:38 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2020-10-28 07:09:38 +0000
commit70a2e9f340996177079f31c00c7684bfa8ff7ed6 (patch)
treedac9c1dff1b8fc96c2f1bbf430632c5d94caabe6 /sys/dev
parenta1791d443de8bf26b6c2d7137bb25f0c6bcc3169 (diff)
Add missing bus_space_barrier() in mcx_cmdq_post() - without this, cmdq
operations during attach fail on some amd64 systems using the TSC delay function, seemingly as there aren't enough memory operations happening to get the doorbell write out to the device otherwise. The lapic delay function didn't expose this problem. suggested by kettenis@ ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_mcx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 8a00f532f64..b2b949b7547 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.72 2020/08/21 04:47:52 jmatthew Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.73 2020/10/28 07:09:37 jmatthew Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -3068,6 +3068,8 @@ mcx_cmdq_post(struct mcx_softc *sc, struct mcx_cmdq_entry *cqe,
0, MCX_DMA_LEN(&sc->sc_cmdq_mem), BUS_DMASYNC_PRERW);
mcx_wr(sc, MCX_CMDQ_DOORBELL, 1U << slot);
+ mcx_bar(sc, MCX_CMDQ_DOORBELL, sizeof(uint32_t),
+ BUS_SPACE_BARRIER_WRITE);
}
static int