search for: data_read

Displaying 20 results from an estimated 54 matches for "data_read".

Did you mean: data_ready
2009 Aug 27
1
Problems using chan_sebi and Huawei E169G
...he problems I am seeing. If your are interested my chan_sebi 1.4 to 1.6 patch is at http://www.mycrofters.com/sites/default/files/chan_sebi.diff . The USB modem is a Huawei E169G. When I load the driver I get the expected responses [Aug 27 13:22:27] DEBUG[560]: chan_sebi.c:1011 do_monitor_phone: data_read() (huawei1) [OK] ]Aug 27 13:22:27] DEBUG[560]: chan_sebi.c:853 data_write: data_write() (huawei1) [AT+CGSN [Aug 27 13:22:27] DEBUG[560]: chan_sebi.c:1011 do_monitor_phone: data_read() (huawei1) [3530xxxxxxxxxxx] ]Aug 27 13:22:27] DEBUG[560]: chan_sebi.c:853 data_write: data_write() (huawei1) [AT+CP...
2003 Mar 26
2
developing with libvorbis
In the example decoder it writes data in varying lengths to stdout, is it possible to alter the decoder to write the same length data to stdout every time? Rather, how would you alter the decoder to do that. It seems to be writing everything from 512 to 4096 bytes each time and i cant really see why this is and how to change it. <p><p>--- >8 ---- List archives:
2014 Jul 05
0
[PATCH v2 1/2] hwrng: fetch randomness only after device init
...early_randomness(rng); + return ret; } static inline void hwrng_cleanup(struct hwrng *rng) @@ -304,8 +325,6 @@ int hwrng_register(struct hwrng *rng) { int err = -EINVAL; struct hwrng *old_rng, *tmp; - unsigned char bytes[16]; - int bytes_read; if (rng->name == NULL || (rng->data_read == NULL && rng->read == NULL)) @@ -347,9 +366,9 @@ int hwrng_register(struct hwrng *rng) INIT_LIST_HEAD(&rng->list); list_add_tail(&rng->list, &rng_list); - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); - if (bytes_read > 0) - add_device_randomness(...
2014 Jul 10
0
[PATCH v3 1/2] hwrng: fetch randomness only after device init
...d_early_randomness(rng); + return 0; } static inline void hwrng_cleanup(struct hwrng *rng) @@ -304,8 +323,6 @@ int hwrng_register(struct hwrng *rng) { int err = -EINVAL; struct hwrng *old_rng, *tmp; - unsigned char bytes[16]; - int bytes_read; if (rng->name == NULL || (rng->data_read == NULL && rng->read == NULL)) @@ -347,9 +364,17 @@ int hwrng_register(struct hwrng *rng) INIT_LIST_HEAD(&rng->list); list_add_tail(&rng->list, &rng_list); - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); - if (bytes_read > 0) - add_device_randomness...
2014 Jul 14
0
[RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay
...drivers can fill up to max bytes of data * into the buffer. The buffer is aligned for any type. + * @flags: Per-device flags. * @priv: Private data, for use by the RNG driver. */ struct hwrng { @@ -37,9 +43,11 @@ struct hwrng { int (*data_present)(struct hwrng *rng, int wait); int (*data_read)(struct hwrng *rng, u32 *data); int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); + unsigned int flags; unsigned long priv; /* internal. */ + struct delayed_work dwork; struct list_head list; }; -- 1.9.3
2002 Aug 05
5
[patch] read-devices
...token. Returns size of data sent (before compression). */ +static int send_deflated_token(int f, int token, struct map_struct *buf, OFF_T offset, int nb, int toklen) { int n, r; static int init_done, flush_pending; extern int write_batch; /* dw */ char temp_byte; /* dw */ + int data_read = 0; if (last_token == -1) { /* initialization */ if (!init_done) { @@ -215,13 +223,15 @@ do { if (tx_strm.avail_in == 0 && nb != 0) { /* give it some more input */ n = MIN(nb, CHUNK_SIZE); - tx_strm.next_in = (Bytef *) - map_ptr(buf, offset, n); - tx_st...
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
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
2014 Jul 07
2
[PATCH v2 1/2] hwrng: fetch randomness only after device init
...uct hwrng *rng) > @@ -304,8 +325,6 @@ int hwrng_register(struct hwrng *rng) > { > int err = -EINVAL; > struct hwrng *old_rng, *tmp; > - unsigned char bytes[16]; > - int bytes_read; > > if (rng->name == NULL || > (rng->data_read == NULL && rng->read == NULL)) > @@ -347,9 +366,9 @@ int hwrng_register(struct hwrng *rng) > INIT_LIST_HEAD(&rng->list); > list_add_tail(&rng->list, &rng_list); > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > -...
2014 Jul 07
2
[PATCH v2 1/2] hwrng: fetch randomness only after device init
...uct hwrng *rng) > @@ -304,8 +325,6 @@ int hwrng_register(struct hwrng *rng) > { > int err = -EINVAL; > struct hwrng *old_rng, *tmp; > - unsigned char bytes[16]; > - int bytes_read; > > if (rng->name == NULL || > (rng->data_read == NULL && rng->read == NULL)) > @@ -347,9 +366,9 @@ int hwrng_register(struct hwrng *rng) > INIT_LIST_HEAD(&rng->list); > list_add_tail(&rng->list, &rng_list); > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > -...
2014 Jul 02
1
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...ll up to max bytes of data * into the buffer. The buffer is aligned for any type. + * @flags: per-device properties * @priv: Private data, for use by the RNG driver. */ struct hwrng { @@ -37,6 +40,7 @@ struct hwrng { int (*data_present)(struct hwrng *rng, int wait); int (*data_read)(struct hwrng *rng, u32 *data); int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); + unsigned long flags; unsigned long priv; /* internal. */ -- 2.0.0
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...dom_data)); + /* There should always be room for one buffer. */ + if (vq->vq_ops->add_buf(vq, &sg, 0, 1, &random_data) != 0) + BUG(); + vq->vq_ops->kick(vq); +} + +static int virtio_data_present(struct hwrng *rng) +{ + return have_data; +} + +static int virtio_data_read(struct hwrng *rng, u32 *data) +{ + 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 = vi...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...dom_data)); + /* There should always be room for one buffer. */ + if (vq->vq_ops->add_buf(vq, &sg, 0, 1, &random_data) != 0) + BUG(); + vq->vq_ops->kick(vq); +} + +static int virtio_data_present(struct hwrng *rng) +{ + return have_data; +} + +static int virtio_data_read(struct hwrng *rng, u32 *data) +{ + 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 = vi...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...ck_sock *vsk, u64 val); > +void virtio_transport_set_min_buffer_size(struct vsock_sock *vsk, u64 val); > +void virtio_transport_set_max_buffer_size(struct vsock_sock *vs, u64 val); > +int > +virtio_transport_notify_poll_in(struct vsock_sock *vsk, > + size_t target, > + bool *data_ready_now); > +int > +virtio_transport_notify_poll_out(struct vsock_sock *vsk, > + size_t target, > + bool *space_available_now); > + > +int virtio_transport_notify_recv_init(struct vsock_sock *vsk, > + size_t target, struct vsock_transport_recv_notify_data *data); > +int...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...ck_sock *vsk, u64 val); > +void virtio_transport_set_min_buffer_size(struct vsock_sock *vsk, u64 val); > +void virtio_transport_set_max_buffer_size(struct vsock_sock *vs, u64 val); > +int > +virtio_transport_notify_poll_in(struct vsock_sock *vsk, > + size_t target, > + bool *data_ready_now); > +int > +virtio_transport_notify_poll_out(struct vsock_sock *vsk, > + size_t target, > + bool *space_available_now); > + > +int virtio_transport_notify_recv_init(struct vsock_sock *vsk, > + size_t target, struct vsock_transport_recv_notify_data *data); > +int...
2014 Jul 14
4
[RFC PATCH 0/3] hw_random: support for delayed init randomness requests
Hello, This series introduces a way to allow devices to contribute to initial system randomness after a certain delay. Specifically, the virtio-rng device can contribute initial randomness only after a successful probe(). A delayed workqueue item is queued in the system queue to fetch this randomness if the device indicates it's capable of contributing only after a delay, via the new
2014 Jul 14
4
[RFC PATCH 0/3] hw_random: support for delayed init randomness requests
Hello, This series introduces a way to allow devices to contribute to initial system randomness after a certain delay. Specifically, the virtio-rng device can contribute initial randomness only after a successful probe(). A delayed workqueue item is queued in the system queue to fetch this randomness if the device indicates it's capable of contributing only after a delay, via the new
2014 Jul 10
5
[PATCH v3 0/2] hwrng, virtio-rng: init-time fixes
v3: - Kees Cook pointed out a weird side-effect: devices which have ->init() registered get their randomness added to the system each time they're switched in, but devices that don't have the init callback don't contribute to system randomness more than once. The weirdness is resolved here by using the randomness each time hwrng_init() is attempted, irrespective of
2014 Jul 10
5
[PATCH v3 0/2] hwrng, virtio-rng: init-time fixes
v3: - Kees Cook pointed out a weird side-effect: devices which have ->init() registered get their randomness added to the system each time they're switched in, but devices that don't have the init callback don't contribute to system randomness more than once. The weirdness is resolved here by using the randomness each time hwrng_init() is attempted, irrespective of
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...ort_set_buffer_size(struct vsock_sock *vsk, u64 val); +void virtio_transport_set_min_buffer_size(struct vsock_sock *vsk, u64 val); +void virtio_transport_set_max_buffer_size(struct vsock_sock *vs, u64 val); +int +virtio_transport_notify_poll_in(struct vsock_sock *vsk, + size_t target, + bool *data_ready_now); +int +virtio_transport_notify_poll_out(struct vsock_sock *vsk, + size_t target, + bool *space_available_now); + +int virtio_transport_notify_recv_init(struct vsock_sock *vsk, + size_t target, struct vsock_transport_recv_notify_data *data); +int virtio_transport_notify_recv_pre_block(...