From 9e91ce04e2b0d45a4eecca81923cc556977047c2 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Sun, 8 Sep 2013 02:18:01 +0000 Subject: Unbreak vmx(4) on i386. The right shift of 32 bits for the DSH register (driver shared address high) exceeded the width of the 32bit bus address; casting the address to a 64bit type will correctly result in a zero value on i386 and the high bits on amd64. --- sys/dev/pci/if_vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index 24d6997877b..68f443f2f34 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.12 2013/08/28 10:19:19 reyk Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.13 2013/09/08 02:18:00 reyk Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -366,7 +366,7 @@ vmxnet3_dma_init(struct vmxnet3_softc *sc) for (i = 0; i < VMXNET3_NINTR; i++) ds->modlevel[i] = UPT1_IMOD_ADAPTIVE; WRITE_BAR1(sc, VMXNET3_BAR1_DSL, ds_pa); - WRITE_BAR1(sc, VMXNET3_BAR1_DSH, ds_pa >> 32); + WRITE_BAR1(sc, VMXNET3_BAR1_DSH, (u_int64_t)ds_pa >> 32); return 0; } -- cgit v1.2.3