xdf.h (843e1988) xdf.h (551bc2a6)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 21 unchanged lines hidden (view full) ---

30
31#pragma ident "%Z%%M% %I% %E% SMI"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 21 unchanged lines hidden (view full) ---

30
31#pragma ident "%Z%%M% %I% %E% SMI"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37
38#include <sys/types.h>
39#include <sys/conf.h>
40#include <sys/ddi.h>
41#include <sys/dditypes.h>
42#include <sys/sunddi.h>
43#include <sys/list.h>
44#include <sys/dkio.h>
45#include <sys/vtoc.h>
46#include <sys/modctl.h>
47#include <sys/bootconf.h>
48#include <sys/promif.h>
49#include <sys/open.h>
50#include <sys/sysmacros.h>
51#include <sys/kstat.h>
52#include <sys/gnttab.h>
53#include <xen/sys/xenbus_impl.h>
54#include <xen/sys/xendev.h>
55#include <sys/cmlb.h>
56#include <sys/scsi/generic/inquiry.h>
57
58#define BLKIF_RING_SIZE __RING_SIZE((blkif_sring_t *)NULL, PAGESIZE)
59
60/*
61 * VBDs have standard 512 byte blocks
62 * A single blkif_request can transfer up to 11 pages of data, 1 page/segment
63 */
64#define XB_BSIZE DEV_BSIZE
65#define XB_BMASK (XB_BSIZE - 1)

--- 37 unchanged lines hidden (view full) ---

103 XD_CLOSED,
104 /*
105 * disconnection process finished, frontend is suspended
106 */
107 XD_SUSPEND
108};
109
110/*
38#define BLKIF_RING_SIZE __RING_SIZE((blkif_sring_t *)NULL, PAGESIZE)
39
40/*
41 * VBDs have standard 512 byte blocks
42 * A single blkif_request can transfer up to 11 pages of data, 1 page/segment
43 */
44#define XB_BSIZE DEV_BSIZE
45#define XB_BMASK (XB_BSIZE - 1)

--- 37 unchanged lines hidden (view full) ---

83 XD_CLOSED,
84 /*
85 * disconnection process finished, frontend is suspended
86 */
87 XD_SUSPEND
88};
89
90/*
111 * 16 paritions + fdisk
91 * 16 partitions + fdisk
112 */
113#define XDF_PSHIFT 6
114#define XDF_PMASK ((1 << XDF_PSHIFT) - 1)
115#define XDF_PEXT (1 << XDF_PSHIFT)
116#define XDF_MINOR(i, m) (((i) << XDF_PSHIFT) | (m))
117#define XDF_INST(m) ((m) >> XDF_PSHIFT)
118#define XDF_PART(m) ((m) & XDF_PMASK)
119

--- 51 unchanged lines hidden (view full) ---

171 ddi_dma_handle_t v_memdmahdl;
172 uint8_t v_flush_diskcache;
173} v_req_t;
174
175/*
176 * Status set and checked in vreq->v_status by vreq_setup()
177 *
178 * These flags will help us to continue the vreq setup work from last failure
92 */
93#define XDF_PSHIFT 6
94#define XDF_PMASK ((1 << XDF_PSHIFT) - 1)
95#define XDF_PEXT (1 << XDF_PSHIFT)
96#define XDF_MINOR(i, m) (((i) << XDF_PSHIFT) | (m))
97#define XDF_INST(m) ((m) >> XDF_PSHIFT)
98#define XDF_PART(m) ((m) & XDF_PMASK)
99

--- 51 unchanged lines hidden (view full) ---

151 ddi_dma_handle_t v_memdmahdl;
152 uint8_t v_flush_diskcache;
153} v_req_t;
154
155/*
156 * Status set and checked in vreq->v_status by vreq_setup()
157 *
158 * These flags will help us to continue the vreq setup work from last failure
179 * point, instead of starting from scrath after each failure.
159 * point, instead of starting from scratch after each failure.
180 */
181#define VREQ_INIT 0x0
182#define VREQ_INIT_DONE 0x1
183#define VREQ_DMAHDL_ALLOCED 0x2
184#define VREQ_MEMDMAHDL_ALLOCED 0x3
185#define VREQ_DMAMEM_ALLOCED 0x4
186#define VREQ_DMABUF_BOUND 0x5
187#define VREQ_GS_ALLOCED 0x6

--- 25 unchanged lines hidden (view full) ---

213 ddi_softintr_t xdf_softintr_id;
214 timeout_id_t xdf_timeout_id;
215 struct gnttab_free_callback xdf_gnt_callback;
216 int xdf_feature_barrier;
217 int xdf_flush_supported;
218 int xdf_wce;
219 char *xdf_flush_mem;
220 char *xdf_cache_flush_block;
160 */
161#define VREQ_INIT 0x0
162#define VREQ_INIT_DONE 0x1
163#define VREQ_DMAHDL_ALLOCED 0x2
164#define VREQ_MEMDMAHDL_ALLOCED 0x3
165#define VREQ_DMAMEM_ALLOCED 0x4
166#define VREQ_DMABUF_BOUND 0x5
167#define VREQ_GS_ALLOCED 0x6

--- 25 unchanged lines hidden (view full) ---

193 ddi_softintr_t xdf_softintr_id;
194 timeout_id_t xdf_timeout_id;
195 struct gnttab_free_callback xdf_gnt_callback;
196 int xdf_feature_barrier;
197 int xdf_flush_supported;
198 int xdf_wce;
199 char *xdf_flush_mem;
200 char *xdf_cache_flush_block;
201 int xdf_evtchn;
221#ifdef DEBUG
222 int xdf_dmacallback_num;
223#endif
224} xdf_t;
225
226#define BP2VREQ(bp) ((v_req_t *)((bp)->av_back))
227
228/*

--- 58 unchanged lines hidden ---
202#ifdef DEBUG
203 int xdf_dmacallback_num;
204#endif
205} xdf_t;
206
207#define BP2VREQ(bp) ((v_req_t *)((bp)->av_back))
208
209/*

--- 58 unchanged lines hidden ---