Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci add feature/register definitions from virtio-v1....
details: https://anonhg.NetBSD.org/src/rev/3c999e738f03
branches: trunk
changeset: 319590:3c999e738f03
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Jun 03 19:47:35 2018 +0000
description:
add feature/register definitions from virtio-v1.0-cs04
diffstat:
sys/dev/pci/ld_virtio.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r ad6245550452 -r 3c999e738f03 sys/dev/pci/ld_virtio.c
--- a/sys/dev/pci/ld_virtio.c Sun Jun 03 18:59:45 2018 +0000
+++ b/sys/dev/pci/ld_virtio.c Sun Jun 03 19:47:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld_virtio.c,v 1.17 2018/06/03 02:13:09 jakllsch Exp $ */
+/* $NetBSD: ld_virtio.c,v 1.18 2018/06/03 19:47:35 jakllsch Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.17 2018/06/03 02:13:09 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.18 2018/06/03 19:47:35 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,6 +60,7 @@
#define VIRTIO_BLK_CONFIG_GEOMETRY_H 18 /* 8bit */
#define VIRTIO_BLK_CONFIG_GEOMETRY_S 19 /* 8bit */
#define VIRTIO_BLK_CONFIG_BLK_SIZE 20 /* 32bit */
+#define VIRTIO_BLK_CONFIG_WRITEBACK 32 /* 8bit */
/* Feature bits */
#define VIRTIO_BLK_F_BARRIER (1<<0)
@@ -70,6 +71,8 @@
#define VIRTIO_BLK_F_BLK_SIZE (1<<6)
#define VIRTIO_BLK_F_SCSI (1<<7)
#define VIRTIO_BLK_F_FLUSH (1<<9)
+#define VIRTIO_BLK_F_TOPOLOGY (1<<10)
+#define VIRTIO_BLK_F_CONFIG_WCE (1<<11)
/*
* Each block request uses at least two segments - one for the header
@@ -79,6 +82,8 @@
#define VIRTIO_BLK_FLAG_BITS \
VIRTIO_COMMON_FLAG_BITS \
+ "\x0c""CONFIG_WCE" \
+ "\x0b""TOPOLOGY" \
"\x0a""FLUSH" \
"\x08""SCSI" \
"\x07""BLK_SIZE" \
@@ -91,11 +96,13 @@
/* Command */
#define VIRTIO_BLK_T_IN 0
#define VIRTIO_BLK_T_OUT 1
+#define VIRTIO_BLK_T_FLUSH 4
#define VIRTIO_BLK_T_BARRIER 0x80000000
/* Status */
#define VIRTIO_BLK_S_OK 0
#define VIRTIO_BLK_S_IOERR 1
+#define VIRTIO_BLK_S_UNSUPP 2
/* Request header structure */
struct virtio_blk_req_hdr {
Home |
Main Index |
Thread Index |
Old Index