summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2015-03-18 12:23:25 +0000
committermikeb <mikeb@openbsd.org>2015-03-18 12:23:25 +0000
commit305a103f2b83a614ac7eaa1c8149a8bc5ffdaaf8 (patch)
tree242a1e608f21a6459062c9e8666044aa9caa8c65
parentremove the congestion handling from struct ifqueue. (diff)
downloadwireguard-openbsd-305a103f2b83a614ac7eaa1c8149a8bc5ffdaaf8.tar.xz
wireguard-openbsd-305a103f2b83a614ac7eaa1c8149a8bc5ffdaaf8.zip
Prevent sign extension due to pointer arithmetics
This should make mpii(4) work on i386 again, apparently. Problem identified and a slightly different fix proposed by Christiano F. Haesbaert and Pedro Martelletto of Bitrig. Huge thanks for tracking this down, guys!
-rw-r--r--sys/dev/pci/mpii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 7d8867f813b..862bfd1361c 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.100 2015/03/14 03:38:48 jsg Exp $ */
+/* $OpenBSD: mpii.c,v 1.101 2015/03/18 12:23:25 mikeb Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -775,7 +775,7 @@ mpii_load_xs(struct mpii_ccb *ccb)
MPII_SGE_FL_SIZE_64 | len);
/* address of the next sge */
mpii_dvatosge(csge, ccb->ccb_cmd_dva +
- (caddr_t)nsge - (caddr_t)io);
+ ((caddr_t)nsge - (caddr_t)io));
}
sge = nsge;