summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-01-15 03:39:13 +0000
committerdlg <dlg@openbsd.org>2016-01-15 03:39:13 +0000
commit84a80625b4d99ebde3bb81bb396216182abb88c2 (patch)
tree5dcd507f8cfc4d5b7c2139e4805361e005dfa5ac
parenthandle the version register like ahci. (diff)
downloadwireguard-openbsd-84a80625b4d99ebde3bb81bb396216182abb88c2.tar.xz
wireguard-openbsd-84a80625b4d99ebde3bb81bb396216182abb88c2.zip
fix calculation of the max queue entries supported value
-rw-r--r--sys/dev/ic/nvmereg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/nvmereg.h b/sys/dev/ic/nvmereg.h
index 926b679101c..a49dd64d5ac 100644
--- a/sys/dev/ic/nvmereg.h
+++ b/sys/dev/ic/nvmereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvmereg.h,v 1.5 2016/01/15 03:28:41 dlg Exp $ */
+/* $OpenBSD: nvmereg.h,v 1.6 2016/01/15 03:39:13 dlg Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -28,7 +28,7 @@
#define NVME_CAP_AMS_WRR (1 << 0)
#define NVME_CAP_AMS_VENDOR (1 << 1)
#define NVME_CAP_CQR(_r) ISSET((_r), (1 << 16))
-#define NVME_CAP_MQES(_r) ((_r) & 0xffff)
+#define NVME_CAP_MQES(_r) (((_r) & 0xffff) + 1)
#define NVME_CAP_LO 0x0000
#define NVME_CAP_HI 0x0004
#define NVME_VS 0x0008 /* Version */