search for: config_change

Displaying 20 results from an estimated 428 matches for "config_change".

2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..3c19bd3 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -108,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev); void virtio_break_device(struct virtio_device *dev); +void virtio_config_changed(struct virtio_device *dev); + /** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..3c19bd3 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -108,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev); void virtio_break_device(struct virtio_device *dev); +void virtio_config_changed(struct virtio_device *dev); + /** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/...
2014 Oct 05
0
[PATCH 02/16] virtio: unify config_changed handling
...diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..3c19bd3 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -108,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev); void virtio_break_device(struct virtio_device *dev); +void virtio_config_changed(struct virtio_device *dev); + /** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/...
2014 Oct 06
0
[PATCH v2 02/15] virtio: unify config_changed handling
...diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..3c19bd3 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -108,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev); void virtio_break_device(struct virtio_device *dev); +void virtio_config_changed(struct virtio_device *dev); + /** * virtio_driver - operations for a virtio I/O driver * @driver: underlying device driver (populate name and owner). diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/...
2014 Oct 13
1
[PATCH v4 04/25] virtio: defer config changed notifications
...@@ -79,6 +79,9 @@ bool virtqueue_is_broken(struct virtqueue *vq); * virtio_device - representation of a device using virtio * @index: unique position on the virtio bus * @failed: saved value for CONFIG_S_FAILED bit (for restore) + * @config_enabled: configuration change reporting enabled + * @config_changed: configuration change reported while disabled + * @config_lock: protects configuration change reporting * @dev: underlying device. * @id: the device type identification (used to match it with a driver). * @config: the configuration ops for this device. @@ -90,6 +93,9 @@ bool virtqueue_is_bro...
2014 Oct 13
1
[PATCH v4 04/25] virtio: defer config changed notifications
...@@ -79,6 +79,9 @@ bool virtqueue_is_broken(struct virtqueue *vq); * virtio_device - representation of a device using virtio * @index: unique position on the virtio bus * @failed: saved value for CONFIG_S_FAILED bit (for restore) + * @config_enabled: configuration change reporting enabled + * @config_changed: configuration change reported while disabled + * @config_lock: protects configuration change reporting * @dev: underlying device. * @id: the device type identification (used to match it with a driver). * @config: the configuration ops for this device. @@ -90,6 +93,9 @@ bool virtqueue_is_bro...
2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() || freezing(current)); Which is a problem because towards_target() call might b...
2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() || freezing(current)); Which is a problem because towards_target() call might b...
2014 Oct 14
0
[PATCH v4 04/25] virtio: defer config changed notifications
...interrupts. > > This change will also benefit old hypervisors (before 2009) > that send interrupts without checking DRIVER_OK: previously, > the callback could race with driver-specific initialization. > > This will also help simplify drivers. But AFAICT you never *read* dev->config_changed. You unconditionally trigger a config_changed event in virtio_config_enable(). That's a bit weird, but probably OK. How about the following change (on top of your patch). I think the renaming is clearer, and note the added if() test in virtio_config_enable(). If you approve, I'll fold...
2014 Oct 05
0
[PATCH 05/16] virtio: defer config changed notifications
...@@ -79,6 +79,9 @@ bool virtqueue_is_broken(struct virtqueue *vq); * virtio_device - representation of a device using virtio * @index: unique position on the virtio bus * @failed: saved value for CONFIG_S_FAILED bit (for restore) + * @config_enabled: configuration change reporting enabled + * @config_changed: configuration change reported while disabled + * @config_lock: protects configuration change reporting * @dev: underlying device. * @id: the device type identification (used to match it with a driver). * @config: the configuration ops for this device. @@ -90,6 +93,9 @@ bool virtqueue_is_bro...
2014 Oct 06
0
[PATCH v2 04/15] virtio: defer config changed notifications
...@@ -79,6 +79,9 @@ bool virtqueue_is_broken(struct virtqueue *vq); * virtio_device - representation of a device using virtio * @index: unique position on the virtio bus * @failed: saved value for CONFIG_S_FAILED bit (for restore) + * @config_enabled: configuration change reporting enabled + * @config_changed: configuration change reported while disabled + * @config_lock: protects configuration change reporting * @dev: underlying device. * @id: the device type identification (used to match it with a driver). * @config: the configuration ops for this device. @@ -90,6 +93,9 @@ bool virtqueue_is_bro...
2014 Oct 06
1
[PATCH 05/16] virtio: defer config changed notifications
...x 657f817..578e02d 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -117,6 +117,40 @@ void virtio_check_driver_offered_feature(const struct virtio_device *vdev, > } > EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); > > +static void __virtio_config_changed(struct virtio_device *dev) > +{ > + struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); > + > + if (!dev->config_enabled) > + dev->config_changed = true; > + else if (drv && drv->config_changed) > + drv->config_changed(dev); > +} > + >...
2014 Oct 06
1
[PATCH 05/16] virtio: defer config changed notifications
...x 657f817..578e02d 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -117,6 +117,40 @@ void virtio_check_driver_offered_feature(const struct virtio_device *vdev, > } > EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); > > +static void __virtio_config_changed(struct virtio_device *dev) > +{ > + struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); > + > + if (!dev->config_enabled) > + dev->config_changed = true; > + else if (drv && drv->config_changed) > + drv->config_changed(dev); > +} > + >...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...s/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_HA...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...s/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_HA...
2013 Nov 27
0
[PATCH char-misc-linus v3 2/6] misc: mic: Minor bug fix in 'retry' loops.
...read8(&dc->used_address_updated)) break; msleep(100); diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c index 5b8494b..945a3d0 100644 --- a/drivers/misc/mic/host/mic_virtio.c +++ b/drivers/misc/mic/host/mic_virtio.c @@ -378,7 +378,7 @@ int mic_virtio_config_change(struct mic_vdev *mvdev, void __user *argp) { DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wake); - int ret = 0, retry = 100, i; + int ret = 0, retry, i; struct mic_bootparam *bootparam = mvdev->mdev->dp; s8 db = bootparam->h2c_config_db; @@ -401,7 +401,7 @@ int mic_virtio_config_change(str...
2014 Oct 05
28
[PATCH 00/16] virtio: fix spec compliance issues
...An error handling bugfix for virtio-net is also included. 2 is merely a theoretical race condition, but it seems important to address to make sure that changes to address 3 do not introduce instability. Michael S. Tsirkin (16): virtio_pci: fix virtio spec compliance on restore virtio: unify config_changed handling virtio: refactor to use drv_to_virtio virtio-pci: move freeze/restore to virtio core virtio: defer config changed notifications virtio_blk: drop config_enable virtio-blk: drop config_mutex virtio_net: drop config_enable virtio-net: drop config_mutex virtio: add API to enab...
2014 Oct 05
28
[PATCH 00/16] virtio: fix spec compliance issues
...An error handling bugfix for virtio-net is also included. 2 is merely a theoretical race condition, but it seems important to address to make sure that changes to address 3 do not introduce instability. Michael S. Tsirkin (16): virtio_pci: fix virtio spec compliance on restore virtio: unify config_changed handling virtio: refactor to use drv_to_virtio virtio-pci: move freeze/restore to virtio core virtio: defer config changed notifications virtio_blk: drop config_enable virtio-blk: drop config_mutex virtio_net: drop config_enable virtio-net: drop config_mutex virtio: add API to enab...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...g, kvm at vger.kernel.org, Cornelia Huck <cornelia.huck at de.ibm.com> Subject: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING Message-ID: <1424874878-17155-1-git-send-email-mst at redhat.com> virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() || freezing(current)); Which is a problem because towards_target() call might b...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...g, kvm at vger.kernel.org, Cornelia Huck <cornelia.huck at de.ibm.com> Subject: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING Message-ID: <1424874878-17155-1-git-send-email-mst at redhat.com> virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() || freezing(current)); Which is a problem because towards_target() call might b...