summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-10-23 01:15:01 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-10-23 01:15:01 +0000
commitbd94e124e937e74f9a16a42629a4f75ee7bea1c5 (patch)
tree191f7e078ff1dd2fd55cce9a797cf75650707965 /sys/dev
parent25b08e0e07c6c0f2bb7b581a070f14e7f3a6c8ef (diff)
define some bits relating to the msg ring
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/vmwpvs.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c
index 1f16dc41c90..d1e2e2d90c9 100644
--- a/sys/dev/pci/vmwpvs.c
+++ b/sys/dev/pci/vmwpvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmwpvs.c,v 1.5 2013/10/14 03:11:27 dlg Exp $ */
+/* $OpenBSD: vmwpvs.c,v 1.6 2013/10/23 01:15:00 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -148,6 +148,20 @@ struct vmwpvs_sge {
u_int32_t flags;
} __packed;
+struct vmwpvs_ring_msg {
+ u_int32_t type;
+ u_int32_t __args[31];
+} __packed;
+
+struct vmwpvs_ring_msg_dev {
+ u_int32_t type;
+ u_int32_t bus;
+ u_int32_t target;
+ u_int8_t lun[8];
+
+ u_int32_t __pad[27];
+} __packed;
+
struct vmwpvs_cfg_cmd {
u_int64_t cmp_addr;
u_int32_t pg_addr;
@@ -156,7 +170,7 @@ struct vmwpvs_cfg_cmd {
u_int32_t __reserved;
} __packed;
-#define VMWPVS_MAX_RING_PAGES 32
+#define VMWPVS_MAX_RING_PAGES 32
struct vmwpvs_setup_rings_cmd {
u_int32_t req_pages;
u_int32_t cmp_pages;
@@ -165,6 +179,13 @@ struct vmwpvs_setup_rings_cmd {
u_int64_t cmp_page_ppn[VMWPVS_MAX_RING_PAGES];
} __packed;
+#define VMWPVS_MAX_MSG_RING_PAGES 16
+struct vmwpvs_setup_rings_msg {
+ u_int32_t msg_pages;
+ u_int32_t __reserved;
+ u_int64_t msg_page_ppn[VMWPVS_MAX_MSG_RING_PAGES];
+} __packed;
+
#define VMWPVS_CMD_FIRST 0
#define VMWPVS_CMD_ADAPTER_RESET 1
#define VMWPVS_CMD_ISSUE_SCSI 2