search for: virtinput_remov

Displaying 20 results from an estimated 31 matches for "virtinput_remov".

Did you mean: virtinput_remove
2015 Aug 05
2
[PATCH] virtio-input: reset device during remove
...t redhat.com> --- drivers/virtio/virtio_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index 60e2a16..6222f9b 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -320,6 +320,7 @@ static void virtinput_remove(struct virtio_device *vdev) spin_unlock_irqrestore(&vi->lock, flags); input_unregister_device(vi->idev); + vdev->config->reset(vdev); vdev->config->del_vqs(vdev); kfree(vi); } -- 2.1.4
2015 Aug 06
0
[PATCH V2] virtio-input: reset device and detach unused during remove
...-- drivers/virtio/virtio_input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index 60e2a16..c96944b 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -313,6 +313,7 @@ err_init_vq: static void virtinput_remove(struct virtio_device *vdev) { struct virtio_input *vi = vdev->priv; + void *buf; unsigned long flags; spin_lock_irqsave(&vi->lock, flags); @@ -320,6 +321,9 @@ static void virtinput_remove(struct virtio_device *vdev) spin_unlock_irqrestore(&vi->lock, flags); input_un...
2015 Aug 05
2
[PATCH] virtio-input: reset device during remove
...t redhat.com> --- drivers/virtio/virtio_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index 60e2a16..6222f9b 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -320,6 +320,7 @@ static void virtinput_remove(struct virtio_device *vdev) spin_unlock_irqrestore(&vi->lock, flags); input_unregister_device(vi->idev); + vdev->config->reset(vdev); vdev->config->del_vqs(vdev); kfree(vi); } -- 2.1.4
2015 Aug 06
0
[PATCH V2] virtio-input: reset device and detach unused during remove
...-- drivers/virtio/virtio_input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index 60e2a16..c96944b 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -313,6 +313,7 @@ err_init_vq: static void virtinput_remove(struct virtio_device *vdev) { struct virtio_input *vi = vdev->priv; + void *buf; unsigned long flags; spin_lock_irqsave(&vi->lock, flags); @@ -320,6 +321,9 @@ static void virtinput_remove(struct virtio_device *vdev) spin_unlock_irqrestore(&vi->lock, flags); input_un...
2015 Mar 19
2
[PATCH 1/1] Add virtio-input driver.
...gt; + kfree(vi); > +out1: > + return err; free on error is out of order with initialization. Might lead to leaks or other bugs. Also - can you name labels something sensible pls? out is usually for exiting on success too... E.g. out4 -> err_register etc. > +} > + > +static void virtinput_remove(struct virtio_device *vdev) > +{ > + struct virtio_input *vi = vdev->priv; > + > + input_unregister_device(vi->idev); > + vdev->config->reset(vdev); You don't really need a reset if you just to del_vqs. People do this if they want to prevent interrupts without delet...
2015 Mar 19
2
[PATCH 1/1] Add virtio-input driver.
...gt; + kfree(vi); > +out1: > + return err; free on error is out of order with initialization. Might lead to leaks or other bugs. Also - can you name labels something sensible pls? out is usually for exiting on success too... E.g. out4 -> err_register etc. > +} > + > +static void virtinput_remove(struct virtio_device *vdev) > +{ > + struct virtio_input *vi = vdev->priv; > + > + input_unregister_device(vi->idev); > + vdev->config->reset(vdev); You don't really need a reset if you just to del_vqs. People do this if they want to prevent interrupts without delet...
2015 Mar 19
5
[PATCH 0/1] Add virtio-input driver.
Hi, This patch adds a virtio driver for input devices. Specification: https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input https://www.kraxel.org/virtio/virtio-v1.0-csprd03-virtio-input.html#x1-2640007 Qemu patches; https://lists.gnu.org/archive/html/qemu-devel/2015-03/threads.html#03973 Gerd Hoffmann (1): Add virtio-input driver. drivers/virtio/Kconfig | 10 ++
2015 Mar 19
5
[PATCH 0/1] Add virtio-input driver.
Hi, This patch adds a virtio driver for input devices. Specification: https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input https://www.kraxel.org/virtio/virtio-v1.0-csprd03-virtio-input.html#x1-2640007 Qemu patches; https://lists.gnu.org/archive/html/qemu-devel/2015-03/threads.html#03973 Gerd Hoffmann (1): Add virtio-input driver. drivers/virtio/Kconfig | 10 ++
2015 Mar 19
0
[PATCH 1/1] Add virtio-input driver.
...>absbit)) + continue; + virtinput_cfg_abs(vi, abs); + } + } + + err = input_register_device(vi->idev); + if (err) + goto out4; + + return 0; + +out4: + input_free_device(vi->idev); +out3: + vdev->config->del_vqs(vdev); +out2: + kfree(vi); +out1: + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + vdev->config->reset(vdev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { V...
2015 Mar 19
0
[PATCH 1/1] Add virtio-input driver.
...>absbit)) + continue; + virtinput_cfg_abs(vi, abs); + } + } + + err = input_register_device(vi->idev); + if (err) + goto out4; + + return 0; + +out4: + input_free_device(vi->idev); +out3: + vdev->config->del_vqs(vdev); +out2: + kfree(vi); +out1: + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + vdev->config->reset(vdev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { V...
2015 Aug 05
0
[PATCH] virtio-input: reset device during remove
...o/virtio_input.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c > index 60e2a16..6222f9b 100644 > --- a/drivers/virtio/virtio_input.c > +++ b/drivers/virtio/virtio_input.c > @@ -320,6 +320,7 @@ static void virtinput_remove(struct virtio_device *vdev) > spin_unlock_irqrestore(&vi->lock, flags); > > input_unregister_device(vi->idev); > + vdev->config->reset(vdev); > vdev->config->del_vqs(vdev); > kfree(vi); > } > -- > 2.1.4
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...if (err) + goto err_input_register; + + virtio_device_ready(vdev); + vi->ready = true; + virtinput_fill_evt(vi); + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + vi->ready = false; + input_unregister_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +#ifdef CONFIG_PM_SLEEP +static int virtinput_freeze(struct virtio_device *vdev) +{ + struct virtio_inp...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...if (err) + goto err_input_register; + + virtio_device_ready(vdev); + vi->ready = true; + virtinput_fill_evt(vi); + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + vi->ready = false; + input_unregister_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +#ifdef CONFIG_PM_SLEEP +static int virtinput_freeze(struct virtio_device *vdev) +{ + struct virtio_inp...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...+ virtio_device_ready(vdev); + + err = input_register_device(vi->idev); + if (err) + goto err_input_register; + + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { VIRTIO_ID_INPUT, VIRTIO_DEV_ANY_ID }...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...+ virtio_device_ready(vdev); + + err = input_register_device(vi->idev); + if (err) + goto err_input_register; + + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { VIRTIO_ID_INPUT, VIRTIO_DEV_ANY_ID }...
2015 Mar 20
2
[PATCH v2] Add virtio-input driver.
...+ virtio_device_ready(vdev); + + err = input_register_device(vi->idev); + if (err) + goto err_input_register; + + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + input_free_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { VI...
2015 Mar 20
2
[PATCH v2] Add virtio-input driver.
...+ virtio_device_ready(vdev); + + err = input_register_device(vi->idev); + if (err) + goto err_input_register; + + return 0; + +err_input_register: + input_free_device(vi->idev); +err_input_alloc: + vdev->config->del_vqs(vdev); +err_init_vq: + kfree(vi); + return err; +} + +static void virtinput_remove(struct virtio_device *vdev) +{ + struct virtio_input *vi = vdev->priv; + + input_unregister_device(vi->idev); + input_free_device(vi->idev); + vdev->config->del_vqs(vdev); + kfree(vi); +} + +static unsigned int features[] = { +}; +static struct virtio_device_id id_table[] = { + { VI...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...At this point you can already get interrupts since you called virtio_device_ready, and getting events from a freed device likely won't DTRT. > +err_input_alloc: > + vdev->config->del_vqs(vdev); > +err_init_vq: > + kfree(vi); > + return err; > +} > + > +static void virtinput_remove(struct virtio_device *vdev) > +{ > + struct virtio_input *vi = vdev->priv; > + > + input_unregister_device(vi->idev); same thing here, you might get an event at this point. You need to somehow block new events being sent to device while keeping device around. Since you already...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...At this point you can already get interrupts since you called virtio_device_ready, and getting events from a freed device likely won't DTRT. > +err_input_alloc: > + vdev->config->del_vqs(vdev); > +err_init_vq: > + kfree(vi); > + return err; > +} > + > +static void virtinput_remove(struct virtio_device *vdev) > +{ > + struct virtio_input *vi = vdev->priv; > + > + input_unregister_device(vi->idev); same thing here, you might get an event at this point. You need to somehow block new events being sent to device while keeping device around. Since you already...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...his point, and you won't be able to forward them. > > > > > +err_input_alloc: > > > + vdev->config->del_vqs(vdev); > > > +err_init_vq: > > > + kfree(vi); > > > + return err; > > > +} > > > + > > > +static void virtinput_remove(struct virtio_device *vdev) > > > +{ > > > + struct virtio_input *vi = vdev->priv; > > > + > > > + input_unregister_device(vi->idev); > > > > same thing here, you might get an event at this point. > > You need to somehow block new events...