Displaying 20 results from an estimated 26 matches for "rng_index_ida".
2014 Jul 21
3
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...> @@ -136,15 +137,6 @@ static int probe_common(struct virtio_device *vdev)
> return err;
> }
>
> - err = hwrng_register(&vi->hwrng);
> - if (err) {
> - vdev->config->del_vqs(vdev);
> - vi->vq = NULL;
> - kfree(vi);
> - ida_simple_remove(&rng_index_ida, index);
> - return err;
> - }
> -
This needs to stay. register, and failure to do so, should occur in the
probe routine.
> probe_done = true;
> return 0;
> }
> @@ -152,9 +144,11 @@ static int probe_common(struct virtio_device *vdev)
> static void remove_common(str...
2014 Jul 21
3
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...> @@ -136,15 +137,6 @@ static int probe_common(struct virtio_device *vdev)
> return err;
> }
>
> - err = hwrng_register(&vi->hwrng);
> - if (err) {
> - vdev->config->del_vqs(vdev);
> - vi->vq = NULL;
> - kfree(vi);
> - ida_simple_remove(&rng_index_ida, index);
> - return err;
> - }
> -
This needs to stay. register, and failure to do so, should occur in the
probe routine.
> probe_done = true;
> return 0;
> }
> @@ -152,9 +144,11 @@ static int probe_common(struct virtio_device *vdev)
> static void remove_common(str...
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 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...wrng_register_done;
};
static bool probe_done;
@@ -137,15 +138,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...wrng_register_done;
};
static bool probe_done;
@@ -137,15 +138,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
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
2014 Jul 21
0
[PATCH 2/3] virtio: rng: delay hwrng_register() till driver is ready
...tic void random_recv_done(struct virtqueue *vq)
{
@@ -136,15 +137,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -152,9 +144,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
2014 Jul 21
0
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...wrng_register_done;
};
static bool probe_done;
@@ -136,15 +137,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -152,9 +144,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
2014 Aug 27
0
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...> @@ -137,15 +138,6 @@ static int probe_common(struct virtio_device *vdev)
> return err;
> }
>
> - err = hwrng_register(&vi->hwrng);
> - if (err) {
> - vdev->config->del_vqs(vdev);
> - vi->vq = NULL;
> - kfree(vi);
> - ida_simple_remove(&rng_index_ida, index);
> - return err;
> - }
> -
> probe_done = true;
> return 0;
> }
> @@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev)
> static void remove_common(struct virtio_device *vdev)
> {
> struct virtrng_info *vi = vdev->priv;
> +
&g...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...wrng_register_done;
};
static bool probe_done;
@@ -137,15 +138,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...wrng_register_done;
};
static bool probe_done;
@@ -137,15 +138,6 @@ static int probe_common(struct virtio_device *vdev)
return err;
}
- err = hwrng_register(&vi->hwrng);
- if (err) {
- vdev->config->del_vqs(vdev);
- vi->vq = NULL;
- kfree(vi);
- ida_simple_remove(&rng_index_ida, index);
- return err;
- }
-
probe_done = true;
return 0;
}
@@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev)
static void remove_common(struct virtio_device *vdev)
{
struct virtrng_info *vi = vdev->priv;
+
vdev->config->reset(vdev);
vi->busy = false;...
2014 Aug 06
2
[PATCH] virtio-rng: complete have_data completion in removing device
On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote:
> On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote:
> > When we try to hot-remove a busy virtio-rng device from QEMU monitor,
> > the device can't be hot-removed. Because virtio-rng driver hangs at
> > wait_for_completion_killable().
> >
> > This patch fixed the hang by completing have_data completion
2014 Aug 06
2
[PATCH] virtio-rng: complete have_data completion in removing device
On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote:
> On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote:
> > When we try to hot-remove a busy virtio-rng device from QEMU monitor,
> > the device can't be hot-removed. Because virtio-rng driver hangs at
> > wait_for_completion_killable().
> >
> > This patch fixed the hang by completing have_data completion
2014 Jul 21
0
[PATCH 1/3] virtio: rng: remove unused struct element
.../hw_random/virtio-rng.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index e9b15bc..d8ffebd 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -28,7 +28,6 @@
static DEFINE_IDA(rng_index_ida);
struct virtrng_info {
- struct virtio_device *vdev;
struct hwrng hwrng;
struct virtqueue *vq;
unsigned int data_avail;
--
1.9.3
2014 Jul 21
0
[PATCH v2 1/4] virtio: rng: remove unused struct element
.../hw_random/virtio-rng.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index e9b15bc..d8ffebd 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -28,7 +28,6 @@
static DEFINE_IDA(rng_index_ida);
struct virtrng_info {
- struct virtio_device *vdev;
struct hwrng hwrng;
struct virtqueue *vq;
unsigned int data_avail;
--
1.9.3
2014 Jul 21
0
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...ommon(struct virtio_device *vdev)
> > return err;
> > }
> >
> > - err = hwrng_register(&vi->hwrng);
> > - if (err) {
> > - vdev->config->del_vqs(vdev);
> > - vi->vq = NULL;
> > - kfree(vi);
> > - ida_simple_remove(&rng_index_ida, index);
> > - return err;
> > - }
> > -
>
> This needs to stay. register, and failure to do so, should occur in the
> probe routine.
Why? Probing involves finding out whether the hardware is present.
While hwrng_register is about adding an entry in the hwrng system
w...
2014 Sep 08
0
[PATCH] virtio-rng: complete have_data completion in removing device
...vi->busy = false;
if (vi->hwrng_register_done)
hwrng_unregister(&vi->hwrng);
+ complete(&vi->have_data);
+ vdev->config->reset(vdev);
+ vi->busy = false;
vdev->config->del_vqs(vdev);
ida_simple_remove(&rng_index_ida, vi->index);
kfree(vi);
2014 Sep 09
2
[PATCH v2] virtio-rng: fix stuck of hot-unplugging busy device
...te(&vi->have_data);
vdev->config->reset(vdev);
vi->busy = false;
- if (vi->hwrng_register_done)
+ if (vi->hwrng_register_done) {
+ vi->hwrng_register_done = false;
hwrng_unregister(&vi->hwrng);
+ }
vdev->config->del_vqs(vdev);
ida_simple_remove(&rng_index_ida, vi->index);
kfree(vi);
--
1.9.3