Displaying 20 results from an estimated 35 matches for "virtrng_probe".
2012 May 28
6
[PATCH 0/5] virtio: rng: fixes
Hi Rusty,
These are a few fixes for the virtio-rng driver. These were tested
using the not-yet-upstream virtio-rng device patch to qemu:
http://thread.gmane.org/gmane.comp.emulators.qemu/152668
Please apply.
Amit Shah (5):
virtio ids: fix comment for virtio-rng
virtio: rng: allow tasks to be killed that are waiting for rng input
virtio: rng: don't wait on host when module is going
2012 May 28
6
[PATCH 0/5] virtio: rng: fixes
Hi Rusty,
These are a few fixes for the virtio-rng driver. These were tested
using the not-yet-upstream virtio-rng device patch to qemu:
http://thread.gmane.org/gmane.comp.emulators.qemu/152668
Please apply.
Amit Shah (5):
virtio ids: fix comment for virtio-rng
virtio: rng: allow tasks to be killed that are waiting for rng input
virtio: rng: don't wait on host when module is going
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...+ BUG_ON(!have_data);
+ *data = random_data;
+
+ have_data = false;
+ register_buffer();
+ return sizeof(*data);
+}
+
+static struct hwrng virtio_hwrng = {
+ .name = "virtio",
+ .data_present = virtio_data_present,
+ .data_read = virtio_data_read,
+};
+
+static int virtrng_probe(struct virtio_device *vdev)
+{
+ int err;
+
+ /* We expect a single virtqueue. */
+ vq = vdev->config->find_vq(vdev, 0, random_recv_done);
+ if (IS_ERR(vq))
+ return PTR_ERR(vq);
+
+ err = hwrng_register(&virtio_hwrng);
+ if (err) {
+ vdev->config->de...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...+ BUG_ON(!have_data);
+ *data = random_data;
+
+ have_data = false;
+ register_buffer();
+ return sizeof(*data);
+}
+
+static struct hwrng virtio_hwrng = {
+ .name = "virtio",
+ .data_present = virtio_data_present,
+ .data_read = virtio_data_read,
+};
+
+static int virtrng_probe(struct virtio_device *vdev)
+{
+ int err;
+
+ /* We expect a single virtqueue. */
+ vq = vdev->config->find_vq(vdev, 0, random_recv_done);
+ if (IS_ERR(vq))
+ return PTR_ERR(vq);
+
+ err = hwrng_register(&virtio_hwrng);
+ if (err) {
+ vdev->config->de...
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...;
+ int err;
+
+ err = hwrng_register(&vi->hwrng);
+ if (!err)
+ vi->hwrng_register_done = true;
+}
+
#ifdef CONFIG_PM_SLEEP
static int virtrng_freeze(struct virtio_device *vdev)
{
@@ -195,6 +199,7 @@ static struct virtio_driver virtio_rng_driver = {
.id_table = id_table,
.probe = virtrng_probe,
.remove = virtrng_remove,
+ .scan = virtrng_scan,
#ifdef CONFIG_PM_SLEEP
.freeze = virtrng_freeze,
.restore = virtrng_restore,
--
1.9.3
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...;
+ int err;
+
+ err = hwrng_register(&vi->hwrng);
+ if (!err)
+ vi->hwrng_register_done = true;
+}
+
#ifdef CONFIG_PM_SLEEP
static int virtrng_freeze(struct virtio_device *vdev)
{
@@ -195,6 +199,7 @@ static struct virtio_driver virtio_rng_driver = {
.id_table = id_table,
.probe = virtrng_probe,
.remove = virtrng_remove,
+ .scan = virtrng_scan,
#ifdef CONFIG_PM_SLEEP
.freeze = virtrng_freeze,
.restore = virtrng_restore,
--
1.9.3
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
...;priv;
vdev->config->reset(vdev);
- busy = false;
- hwrng_unregister(&virtio_hwrng);
+ vi->busy = false;
+ hwrng_unregister(&vi->hwrng);
vdev->config->del_vqs(vdev);
- vq = NULL;
+ kfree(vi->hwrng.name);
+ vi->vq = NULL;
+ kfree(vi);
+ vi = NULL;
}
static int virtrng_probe(struct virtio_device *vdev)
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index b4b0eef..02d9c87 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -31,7 +31,7 @@
* @priv: Private data, for use by the RNG driver.
*/
struct hwrng {
- const char *name...
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
...;priv;
vdev->config->reset(vdev);
- busy = false;
- hwrng_unregister(&virtio_hwrng);
+ vi->busy = false;
+ hwrng_unregister(&vi->hwrng);
vdev->config->del_vqs(vdev);
- vq = NULL;
+ kfree(vi->hwrng.name);
+ vi->vq = NULL;
+ kfree(vi);
+ vi = NULL;
}
static int virtrng_probe(struct virtio_device *vdev)
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index b4b0eef..02d9c87 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -31,7 +31,7 @@
* @priv: Private data, for use by the RNG driver.
*/
struct hwrng {
- const char *name...
2012 Jun 18
2
[RFC 1/2] virtio-ring: Use threshold for switching to indirect descriptors
...,9 @@
#include <linux/virtio_rng.h>
#include <linux/module.h>
+static unsigned int indirect_thresh = 0;
+module_param(indirect_thresh, uint, S_IRUGO);
+
static struct virtqueue *vq;
static unsigned int data_avail;
static DECLARE_COMPLETION(have_data);
@@ -90,6 +93,7 @@ static int virtrng_probe(struct virtio_device *vdev)
int err;
/* We expect a single virtqueue. */
+ vdev->indirect_thresh = indirect_thresh;
vq = virtio_find_single_vq(vdev, random_recv_done, "input");
if (IS_ERR(vq))
return PTR_ERR(vq);
diff --git a/drivers/char/virtio_console.c b/drivers/char/vi...
2012 Jun 18
2
[RFC 1/2] virtio-ring: Use threshold for switching to indirect descriptors
...,9 @@
#include <linux/virtio_rng.h>
#include <linux/module.h>
+static unsigned int indirect_thresh = 0;
+module_param(indirect_thresh, uint, S_IRUGO);
+
static struct virtqueue *vq;
static unsigned int data_avail;
static DECLARE_COMPLETION(have_data);
@@ -90,6 +93,7 @@ static int virtrng_probe(struct virtio_device *vdev)
int err;
/* We expect a single virtqueue. */
+ vdev->indirect_thresh = indirect_thresh;
vq = virtio_find_single_vq(vdev, random_recv_done, "input");
if (IS_ERR(vq))
return PTR_ERR(vq);
diff --git a/drivers/char/virtio_console.c b/drivers/char/vi...
2013 Mar 06
1
[PATCH 1/1] virtio: rng: disallow multiple device registrations, fixes crashes
...mp;virtio_hwrng);
if (err) {
vdev->config->del_vqs(vdev);
+ vq = NULL;
return err;
}
@@ -112,6 +120,7 @@ static void remove_common(struct virtio_device *vdev)
busy = false;
hwrng_unregister(&virtio_hwrng);
vdev->config->del_vqs(vdev);
+ vq = NULL;
}
static int virtrng_probe(struct virtio_device *vdev)
--
1.8.1.2
2013 Mar 06
1
[PATCH 1/1] virtio: rng: disallow multiple device registrations, fixes crashes
...mp;virtio_hwrng);
if (err) {
vdev->config->del_vqs(vdev);
+ vq = NULL;
return err;
}
@@ -112,6 +120,7 @@ static void remove_common(struct virtio_device *vdev)
busy = false;
hwrng_unregister(&virtio_hwrng);
vdev->config->del_vqs(vdev);
+ vq = NULL;
}
static int virtrng_probe(struct virtio_device *vdev)
--
1.8.1.2
2014 Jul 21
0
[PATCH 2/3] virtio: rng: delay hwrng_register() till driver is ready
...gt;priv;
+ int err;
+
+ err = hwrng_register(&vi->hwrng);
+ if (!err)
+ hwrng_register_done = true;
+}
+
#ifdef CONFIG_PM_SLEEP
static int virtrng_freeze(struct virtio_device *vdev)
{
@@ -194,6 +198,7 @@ static struct virtio_driver virtio_rng_driver = {
.id_table = id_table,
.probe = virtrng_probe,
.remove = virtrng_remove,
+ .scan = virtrng_scan,
#ifdef CONFIG_PM_SLEEP
.freeze = virtrng_freeze,
.restore = virtrng_restore,
--
1.9.3
2014 Jul 21
0
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...;
+ int err;
+
+ err = hwrng_register(&vi->hwrng);
+ if (!err)
+ vi->hwrng_register_done = true;
+}
+
#ifdef CONFIG_PM_SLEEP
static int virtrng_freeze(struct virtio_device *vdev)
{
@@ -194,6 +198,7 @@ static struct virtio_driver virtio_rng_driver = {
.id_table = id_table,
.probe = virtrng_probe,
.remove = virtrng_remove,
+ .scan = virtrng_scan,
#ifdef CONFIG_PM_SLEEP
.freeze = virtrng_freeze,
.restore = virtrng_restore,
--
1.9.3
2014 Aug 27
0
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...hwrng);
> + if (!err)
> + vi->hwrng_register_done = true;
> +}
> +
> #ifdef CONFIG_PM_SLEEP
> static int virtrng_freeze(struct virtio_device *vdev)
> {
> @@ -195,6 +199,7 @@ static struct virtio_driver virtio_rng_driver = {
> .id_table = id_table,
> .probe = virtrng_probe,
> .remove = virtrng_remove,
> + .scan = virtrng_scan,
> #ifdef CONFIG_PM_SLEEP
> .freeze = virtrng_freeze,
> .restore = virtrng_restore,
> --
> 1.9.3
>
Amit
2014 Jul 21
8
[PATCH v2 0/4] virtio-rng: contribute to early randomness requests
v2:
- update patch 3 to store the hwrng_register_done bool per-device
rather than global
- add patch 2 that re-arranges struct elems for better packing.
Hi,
This series enables virtio-rng to service the early randomness
requests made by the hwrng core (patch 3), with Herbert's idea of
using the scan routine.
Patch 4 reverts the previous restriction, which no longer applies, to
not send
2014 Jul 21
8
[PATCH v2 0/4] virtio-rng: contribute to early randomness requests
v2:
- update patch 3 to store the hwrng_register_done bool per-device
rather than global
- add patch 2 that re-arranges struct elems for better packing.
Hi,
This series enables virtio-rng to service the early randomness
requests made by the hwrng core (patch 3), with Herbert's idea of
using the scan routine.
Patch 4 reverts the previous restriction, which no longer applies, to
not send
2014 Jul 21
4
[PATCH 0/3] virtio-rng: contribute to early randomness requests
Hi,
This series enables virtio-rng to service the early randomness
requests made by the hwrng core (patch 2), with Herbert's idea of
using the scan routine.
Patch 3 reverts the previous restriction, which no longer applies, to
not send read requests to the host before successful probe.
Patch 1 is a minor cleanup.
Please review and apply,
Amit Shah (3):
virtio: rng: remove unused struct
2014 Jul 21
4
[PATCH 0/3] virtio-rng: contribute to early randomness requests
Hi,
This series enables virtio-rng to service the early randomness
requests made by the hwrng core (patch 2), with Herbert's idea of
using the scan routine.
Patch 3 reverts the previous restriction, which no longer applies, to
not send read requests to the host before successful probe.
Patch 1 is a minor cleanup.
Please review and apply,
Amit Shah (3):
virtio: rng: remove unused struct
2013 Sep 06
4
[PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP
This patchset replace CONFIG_PM with CONFIG_PM_SLEEP for all virtio
drivers and virtio pci driver.
With patch 1/2, two compile warnings are eliminated for virtio pci
driver, and patch 2/2 is a clean up for all virtio drivers as suggested
by Amit Shah.
Aaron Lu (2):
virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM