Displaying 20 results from an estimated 164 matches for "virtio_config_s_fail".
Did you mean:
virtio_config_s_failed
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi)
>> +{
>> + struct virtio_device *dev = vi->vdev;
>> + int ret;
>> +
>> + virtio_config_disable(dev);
>> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> + virtnet_freeze_down(dev, true);
>> + remove_vq_common(vi);
>> +
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> +
>> + ret = virtio_finalize_features(dev);
>>...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi)
>> +{
>> + struct virtio_device *dev = vi->vdev;
>> + int ret;
>> +
>> + virtio_config_disable(dev);
>> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> + virtnet_freeze_down(dev, true);
>> + remove_vq_common(vi);
>> +
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> +
>> + ret = virtio_finalize_features(dev);
>>...
2014 Sep 23
5
[PATCH RFC] virtio_pci: fix virtio spec compliance on restore
...(&vp_dev->vdev);
+
+ /* Acknowledge that we've seen the device. */
+ status |= VIRTIO_CONFIG_S_ACKNOWLEDGE;
+ vp_set_status(&vp_dev->vdev, status);
+
+ /* Maybe driver failed before freeze.
+ * Restore the failed status, for debugging. */
+ status |= vp_dev->saved_status & VIRTIO_CONFIG_S_FAILED;
+ vp_set_status(&vp_dev->vdev, status);
+
+ if (!drv)
+ return 0;
+
+ /* We have a driver! */
+ status |= VIRTIO_CONFIG_S_DRIVER;
+ vp_set_status(&vp_dev->vdev, status);
+
vp_finalize_features(&vp_dev->vdev);
- if (drv && drv->restore)
- ret = drv->restor...
2014 Sep 23
5
[PATCH RFC] virtio_pci: fix virtio spec compliance on restore
...(&vp_dev->vdev);
+
+ /* Acknowledge that we've seen the device. */
+ status |= VIRTIO_CONFIG_S_ACKNOWLEDGE;
+ vp_set_status(&vp_dev->vdev, status);
+
+ /* Maybe driver failed before freeze.
+ * Restore the failed status, for debugging. */
+ status |= vp_dev->saved_status & VIRTIO_CONFIG_S_FAILED;
+ vp_set_status(&vp_dev->vdev, status);
+
+ if (!drv)
+ return 0;
+
+ /* We have a driver! */
+ status |= VIRTIO_CONFIG_S_DRIVER;
+ vp_set_status(&vp_dev->vdev, status);
+
vp_finalize_features(&vp_dev->vdev);
- if (drv && drv->restore)
- ret = drv->restor...
2014 Oct 05
0
[PATCH 04/16] virtio-pci: move freeze/restore to virtio core
...io_config_changed(struct virtio_device *dev)
}
EXPORT_SYMBOL_GPL(virtio_config_changed);
+#ifdef CONFIG_PM_SLEEP
+int virtio_device_freeze(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+
+ if (drv && drv->freeze)
+ return drv->freeze(dev);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_freeze);
+
+int virtio_device_restore(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ /* We always start by resetting the dev...
2014 Oct 06
0
[PATCH v2 03/15] virtio-pci: move freeze/restore to virtio core
...io_config_changed(struct virtio_device *dev)
}
EXPORT_SYMBOL_GPL(virtio_config_changed);
+#ifdef CONFIG_PM_SLEEP
+int virtio_device_freeze(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+
+ if (drv && drv->freeze)
+ return drv->freeze(dev);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_freeze);
+
+int virtio_device_restore(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ /* We always start by resetting the dev...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...io_config_changed(struct virtio_device *dev)
}
EXPORT_SYMBOL_GPL(virtio_config_changed);
+#ifdef CONFIG_PM_SLEEP
+int virtio_device_freeze(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+
+ if (drv && drv->freeze)
+ return drv->freeze(dev);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_freeze);
+
+int virtio_device_restore(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ /* We always start by resetting the dev...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...io_config_changed(struct virtio_device *dev)
}
EXPORT_SYMBOL_GPL(virtio_config_changed);
+#ifdef CONFIG_PM_SLEEP
+int virtio_device_freeze(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+
+ if (drv && drv->freeze)
+ return drv->freeze(dev);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_freeze);
+
+int virtio_device_restore(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ /* We always start by resetting the dev...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...@@ -1952,6 +1954,40 @@ static int virtnet_restore_up(struct virtio_device *vdev)
return err;
}
+static int virtnet_reset(struct virtnet_info *vi)
+{
+ struct virtio_device *dev = vi->vdev;
+ int ret;
+
+ virtio_config_disable(dev);
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+ virtnet_freeze_down(dev, true);
+ remove_vq_common(vi);
+
+ virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
+ virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
+
+ ret = virtio_finalize_features(dev);
+ if (ret)
+ goto err;
+
+ ret = virtnet_restore_up(dev);
+ if (ret)
+ goto err;
+
+ ret...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...@@ -1952,6 +1954,40 @@ static int virtnet_restore_up(struct virtio_device *vdev)
return err;
}
+static int virtnet_reset(struct virtnet_info *vi)
+{
+ struct virtio_device *dev = vi->vdev;
+ int ret;
+
+ virtio_config_disable(dev);
+ dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
+ virtnet_freeze_down(dev, true);
+ remove_vq_common(vi);
+
+ virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
+ virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
+
+ ret = virtio_finalize_features(dev);
+ if (ret)
+ goto err;
+
+ ret = virtnet_restore_up(dev);
+ if (ret)
+ goto err;
+
+ ret...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t(struct virtnet_info *vi)
>> >> +{
>> >> + struct virtio_device *dev = vi->vdev;
>> >> + int ret;
>> >> +
>> >> + virtio_config_disable(dev);
>> >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> >> + virtnet_freeze_down(dev, true);
>> >> + remove_vq_common(vi);
>> >> +
>> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> >> +
>&...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...t(struct virtnet_info *vi)
>> >> +{
>> >> + struct virtio_device *dev = vi->vdev;
>> >> + int ret;
>> >> +
>> >> + virtio_config_disable(dev);
>> >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> >> + virtnet_freeze_down(dev, true);
>> >> + remove_vq_common(vi);
>> >> +
>> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> >> +
>&...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...+{
>> >> >> + struct virtio_device *dev = vi->vdev;
>> >> >> + int ret;
>> >> >> +
>> >> >> + virtio_config_disable(dev);
>> >> >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> >> >> + virtnet_freeze_down(dev, true);
>> >> >> + remove_vq_common(vi);
>> >> >> +
>> >> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> >> >> + virtio_add_status(dev, VIRTI...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...+{
>> >> >> + struct virtio_device *dev = vi->vdev;
>> >> >> + int ret;
>> >> >> +
>> >> >> + virtio_config_disable(dev);
>> >> >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> >> >> + virtnet_freeze_down(dev, true);
>> >> >> + remove_vq_common(vi);
>> >> >> +
>> >> >> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> >> >> + virtio_add_status(dev, VIRTI...
2017 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
...register_virtio_device(struct virtio_device *dev)
/* device_register() causes the bus infrastructure to look for a
* matching driver. */
err = device_register(&dev->dev);
+ if (err)
+ ida_simple_remove(&virtio_index_ida, dev->index);
out:
if (err)
virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
--
2.9.4
2017 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
...register_virtio_device(struct virtio_device *dev)
/* device_register() causes the bus infrastructure to look for a
* matching driver. */
err = device_register(&dev->dev);
+ if (err)
+ ida_simple_remove(&virtio_index_ida, dev->index);
out:
if (err)
virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
--
2.9.4
2017 Oct 17
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...vice *dev = vi->vdev;
> > > > > > > > + int ret;
> > > > > > > > +
> > > > > > > > + virtio_config_disable(dev);
> > > > > > > > + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
> > > > > > > > + virtnet_freeze_down(dev, true);
> > > > > > > > + remove_vq_common(vi);
> > > > > > > > +
> > > > > > > > + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> >...
2014 Oct 22
0
[PATCH RFC v2 09/16] virtio: set FEATURES_OK
...o_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index d213567..a3df817 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device *_d)
struct virtio_device *dev = dev_to_virtio(_d);
struct virtio_driv...
2014 Oct 23
0
[PATCH RFC v4 09/17] virtio: set FEATURES_OK
...o_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index d213567..a3df817 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device *_d)
struct virtio_device *dev = dev_to_virtio(_d);
struct virtio_driv...
2014 Nov 24
0
[PATCH v3 08/41] virtio: set FEATURES_OK
...o_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index d213567..a3df817 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -160,6 +160,7 @@ static int virtio_dev_probe(struct device *_d)
struct virtio_device *dev = dev_to_virtio(_d);
struct virtio_driv...