From 70a2e9f340996177079f31c00c7684bfa8ff7ed6 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Wed, 28 Oct 2020 07:09:38 +0000 Subject: 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@ --- sys/dev/pci/if_mcx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev') 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 @@ -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 -- cgit v1.2.3