Displaying 20 results from an estimated 56 matches for "probe_common".
2014 Jul 21
3
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
.../hw_random/virtio-rng.c
> +++ b/drivers/char/hw_random/virtio-rng.c
> @@ -35,6 +35,7 @@ struct virtrng_info {
> unsigned int data_avail;
> int index;
> bool busy;
> + bool hwrng_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;
> -...
2014 Jul 21
3
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
.../hw_random/virtio-rng.c
> +++ b/drivers/char/hw_random/virtio-rng.c
> @@ -35,6 +35,7 @@ struct virtrng_info {
> unsigned int data_avail;
> int index;
> bool busy;
> + bool hwrng_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;
> -...
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...irtio-rng.c
index e9b15bc..f4e04f3 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -36,6 +36,7 @@ struct virtrng_info {
bool busy;
char name[25];
int index;
+ bool hwrng_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,...
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...irtio-rng.c
index e9b15bc..f4e04f3 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -36,6 +36,7 @@ struct virtrng_info {
bool busy;
char name[25];
int index;
+ bool hwrng_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,...
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
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
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
...n(&have_data);
-}
-
+ struct virtrng_info *vi = (struct virtrng_info *)rng->priv;
-static struct hwrng virtio_hwrng = {
- .name = "virtio",
- .cleanup = virtio_cleanup,
- .read = virtio_read,
-};
+ if (vi->busy)
+ wait_for_completion(&vi->have_data);
+}
static int probe_common(struct virtio_device *vdev)
{
- int err;
+ int err, i;
+ struct virtrng_info *vi = NULL;
+
+ vi = kmalloc(sizeof(struct virtrng_info), GFP_KERNEL);
+ vi->hwrng.name = kmalloc(40, GFP_KERNEL);
+ init_completion(&vi->have_data);
+
+ vi->hwrng.read = virtio_read;
+ vi->hwrng.cleanup =...
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
...n(&have_data);
-}
-
+ struct virtrng_info *vi = (struct virtrng_info *)rng->priv;
-static struct hwrng virtio_hwrng = {
- .name = "virtio",
- .cleanup = virtio_cleanup,
- .read = virtio_read,
-};
+ if (vi->busy)
+ wait_for_completion(&vi->have_data);
+}
static int probe_common(struct virtio_device *vdev)
{
- int err;
+ int err, i;
+ struct virtrng_info *vi = NULL;
+
+ vi = kmalloc(sizeof(struct virtrng_info), GFP_KERNEL);
+ vi->hwrng.name = kmalloc(40, GFP_KERNEL);
+ init_completion(&vi->have_data);
+
+ vi->hwrng.read = virtio_read;
+ vi->hwrng.cleanup =...
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
...ffebd..32e6373 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -38,6 +38,7 @@ struct virtrng_info {
};
static bool probe_done;
+static bool hwrng_register_done;
static 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,...
2014 Jul 21
0
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...c
index a156284..d9927eb 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -35,6 +35,7 @@ struct virtrng_info {
unsigned int data_avail;
int index;
bool busy;
+ bool hwrng_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,...
2014 Aug 27
0
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...ivers/char/hw_random/virtio-rng.c
> +++ b/drivers/char/hw_random/virtio-rng.c
> @@ -36,6 +36,7 @@ struct virtrng_info {
> bool busy;
> char name[25];
> int index;
> + bool hwrng_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;
> -...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...irtio-rng.c
index e9b15bc..f4e04f3 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -36,6 +36,7 @@ struct virtrng_info {
bool busy;
char name[25];
int index;
+ bool hwrng_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,...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...irtio-rng.c
index e9b15bc..f4e04f3 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -36,6 +36,7 @@ struct virtrng_info {
bool busy;
char name[25];
int index;
+ bool hwrng_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,...
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi,
When booting a recent kernel under KVM with the virtio-rng device
enabled, the boot process was stalling. Bisect pointed to a commit
made during the 3.15 window to fetch randomness from newly-registered
devices in the hwrng core. The details are in the patches.
I considered a couple of approaches, but basing on the init() function
being registered, as is done in patch 1 here, seems like
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi,
When booting a recent kernel under KVM with the virtio-rng device
enabled, the boot process was stalling. Bisect pointed to a commit
made during the 3.15 window to fetch randomness from newly-registered
devices in the hwrng core. The details are in the patches.
I considered a couple of approaches, but basing on the init() function
being registered, as is done in patch 1 here, seems like
2014 Jul 05
6
[PATCH v2 0/2] hwrng, virtio-rng: init-time fixes
v2:
- this now separates both the patches; the virtio-rng fix is self-contained
- re-work hwrng core to fetch randomness at device init time if
->init() is registered by the device, instead of not calling it at all.
- virtio-rng: introduce a probe_done bool to ensure we don't ask host
for data before successful probe
Hi,
When booting a recent kernel under KVM with the virtio-rng