xref: /linux/include/xen/interface/io/xenbus.h (revision 9e2b3e834c450ce23073093992f450544100c99a)
1*9e2b3e83SJuergen Gross /* SPDX-License-Identifier: MIT */
2a42089ddSJeremy Fitzhardinge /*****************************************************************************
3a42089ddSJeremy Fitzhardinge  * xenbus.h
4a42089ddSJeremy Fitzhardinge  *
5a42089ddSJeremy Fitzhardinge  * Xenbus protocol details.
6a42089ddSJeremy Fitzhardinge  *
7a42089ddSJeremy Fitzhardinge  * Copyright (C) 2005 XenSource Ltd.
8a42089ddSJeremy Fitzhardinge  */
9a42089ddSJeremy Fitzhardinge 
10a42089ddSJeremy Fitzhardinge #ifndef _XEN_PUBLIC_IO_XENBUS_H
11a42089ddSJeremy Fitzhardinge #define _XEN_PUBLIC_IO_XENBUS_H
12a42089ddSJeremy Fitzhardinge 
13a42089ddSJeremy Fitzhardinge /* The state of either end of the Xenbus, i.e. the current communication
14a42089ddSJeremy Fitzhardinge    status of initialisation across the bus.  States here imply nothing about
15a42089ddSJeremy Fitzhardinge    the state of the connection between the driver and the kernel's device
16a42089ddSJeremy Fitzhardinge    layers.  */
17a42089ddSJeremy Fitzhardinge enum xenbus_state
18a42089ddSJeremy Fitzhardinge {
19a42089ddSJeremy Fitzhardinge 	XenbusStateUnknown      = 0,
20a42089ddSJeremy Fitzhardinge 	XenbusStateInitialising = 1,
21a42089ddSJeremy Fitzhardinge 	XenbusStateInitWait     = 2,  /* Finished early
22a42089ddSJeremy Fitzhardinge 					 initialisation, but waiting
23a42089ddSJeremy Fitzhardinge 					 for information from the peer
24a42089ddSJeremy Fitzhardinge 					 or hotplug scripts. */
25a42089ddSJeremy Fitzhardinge 	XenbusStateInitialised  = 3,  /* Initialised and waiting for a
26a42089ddSJeremy Fitzhardinge 					 connection from the peer. */
27a42089ddSJeremy Fitzhardinge 	XenbusStateConnected    = 4,
28a42089ddSJeremy Fitzhardinge 	XenbusStateClosing      = 5,  /* The device is being closed
29a42089ddSJeremy Fitzhardinge 					 due to an error or an unplug
30a42089ddSJeremy Fitzhardinge 					 event. */
3189afb6e4SYosuke Iwamatsu 	XenbusStateClosed       = 6,
32a42089ddSJeremy Fitzhardinge 
3389afb6e4SYosuke Iwamatsu 	/*
3489afb6e4SYosuke Iwamatsu 	* Reconfiguring: The device is being reconfigured.
3589afb6e4SYosuke Iwamatsu 	*/
3689afb6e4SYosuke Iwamatsu 	XenbusStateReconfiguring = 7,
3789afb6e4SYosuke Iwamatsu 
3889afb6e4SYosuke Iwamatsu 	XenbusStateReconfigured  = 8
39a42089ddSJeremy Fitzhardinge };
40a42089ddSJeremy Fitzhardinge 
41a42089ddSJeremy Fitzhardinge #endif /* _XEN_PUBLIC_IO_XENBUS_H */
42