search for: virtio_grab_drvdata

Displaying 6 results from an estimated 6 matches for "virtio_grab_drvdata".

2013 Dec 13
0
[PATCH v4 RFC 1/3] virtio_ccw: fix vcdev pointer handling issues
...irtio_driver *drv; + if (!vcdev) + return; /* Check if it's a notification from the host. */ if ((intparm == 0) && (scsw_stctl(&irb->scsw) == @@ -985,23 +987,37 @@ static int virtio_ccw_probe(struct ccw_device *cdev) return 0; } +static struct virtio_ccw_device *virtio_grab_drvdata(struct ccw_device *cdev) +{ + unsigned long flags; + struct virtio_ccw_device *vcdev; + + spin_lock_irqsave(get_ccwdev_lock(cdev), flags); + vcdev = dev_get_drvdata(&cdev->dev); + if (!vcdev) { + spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); + return NULL; + } + dev_set_drvdata(&am...
2014 Apr 25
0
[PATCH 1/1] virtio_ccw: introduce device_lost in virtio_ccw_device
...,6 +63,7 @@ struct virtio_ccw_device { struct vq_config_block *config_block; bool is_thinint; bool going_away; + bool device_lost; void *airq_info; }; @@ -1010,11 +1012,14 @@ static void virtio_ccw_remove(struct ccw_device *cdev) unsigned long flags; struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); - if (vcdev && cdev->online) + if (vcdev && cdev->online) { + if (vcdev->device_lost) + virtio_break_device(&vcdev->vdev); unregister_virtio_device(&vcdev->vdev); - spin_lock_irqsave(get_ccwdev_lock(cdev), flags); - dev_set_drvdata(&cdev-&gt...
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty, this patch exploits the new function virtio_break_device() as of your patch set dated January 15th on linux-kernel at vger.kernel.org. The patch avoids hang situations during device unregister, when a (block) device with active IO is hot-unplugged. Heinz Graalfs (1): virtio_ccw: introduce device_lost in virtio_ccw_device drivers/s390/kvm/virtio_ccw.c | 49
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty, this patch exploits the new function virtio_break_device() as of your patch set dated January 15th on linux-kernel at vger.kernel.org. The patch avoids hang situations during device unregister, when a (block) device with active IO is hot-unplugged. Heinz Graalfs (1): virtio_ccw: introduce device_lost in virtio_ccw_device drivers/s390/kvm/virtio_ccw.c | 49
2013 Dec 13
7
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. Additionally a potential
2013 Dec 13
7
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. Additionally a potential