aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorPaul Durrant <pdurrant@amazon.com>2019-12-11 15:29:54 +0000
committerJuergen Gross <jgross@suse.com>2019-12-20 13:44:38 +0100
commit672b7763cb2c723fd6f92a3879cc60d2fb11e56a (patch)
tree0c02679348828cabd2b20ebfd564490ca20b8aa7 /include/xen
parentxenbus: move xenbus_dev_shutdown() into frontend code... (diff)
downloadlinux-dev-672b7763cb2c723fd6f92a3879cc60d2fb11e56a.tar.xz
linux-dev-672b7763cb2c723fd6f92a3879cc60d2fb11e56a.zip
xenbus: limit when state is forced to closed
If a driver probe() fails then leave the xenstore state alone. There is no reason to modify it as the failure may be due to transient resource allocation issues and hence a subsequent probe() may succeed. If the driver supports re-binding then only force state to closed during remove() only in the case when the toolstack may need to clean up. This can be detected by checking whether the state in xenstore has been set to closing prior to device removal. NOTE: Re-bind support is indicated by new boolean in struct xenbus_driver, which defaults to false. Subsequent patches will add support to some backend drivers. Signed-off-by: Paul Durrant <pdurrant@amazon.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/xenbus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index 869c816d5f8c..24228a102141 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -93,6 +93,7 @@ struct xenbus_device_id
struct xenbus_driver {
const char *name; /* defaults to ids[0].devicetype */
const struct xenbus_device_id *ids;
+ bool allow_rebind; /* avoid setting xenstore closed during remove */
int (*probe)(struct xenbus_device *dev,
const struct xenbus_device_id *id);
void (*otherend_changed)(struct xenbus_device *dev,