search for: virtio_ccw_online

Displaying 20 results from an estimated 71 matches for "virtio_ccw_online".

2013 Dec 13
0
[PATCH v4 RFC 1/3] virtio_ccw: fix vcdev pointer handling issues
..._drvdata(&cdev->dev); + struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); - unregister_virtio_device(&vcdev->vdev); - dev_set_drvdata(&cdev->dev, NULL); + if (vcdev) + unregister_virtio_device(&vcdev->vdev); return 0; } @@ -1010,6 +1026,7 @@ static int virtio_ccw_online(struct ccw_device *cdev) { int ret; struct virtio_ccw_device *vcdev; + unsigned long flags; vcdev = kzalloc(sizeof(*vcdev), GFP_KERNEL); if (!vcdev) { @@ -1039,7 +1056,9 @@ static int virtio_ccw_online(struct ccw_device *cdev) INIT_LIST_HEAD(&vcdev->virtqueues); spin_lock_init...
2020 May 26
3
[PATCH] s390/virtio: remove unused pm callbacks
...io_ccw_set_transport_rev(vcdev); - if (ret) - return ret; - - return virtio_device_restore(&vcdev->vdev); -} -#endif - static struct ccw_driver virtio_ccw_driver = { .driver = { .owner = THIS_MODULE, @@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = { .set_online = virtio_ccw_online, .notify = virtio_ccw_cio_notify, .int_class = IRQIO_VIR, -#ifdef CONFIG_PM_SLEEP - .freeze = virtio_ccw_freeze, - .thaw = virtio_ccw_restore, - .restore = virtio_ccw_restore, -#endif }; static int __init pure_hex(char **cp, unsigned int *val, int min_digit, -- 2.25.4
2020 May 26
3
[PATCH] s390/virtio: remove unused pm callbacks
...io_ccw_set_transport_rev(vcdev); - if (ret) - return ret; - - return virtio_device_restore(&vcdev->vdev); -} -#endif - static struct ccw_driver virtio_ccw_driver = { .driver = { .owner = THIS_MODULE, @@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = { .set_online = virtio_ccw_online, .notify = virtio_ccw_cio_notify, .int_class = IRQIO_VIR, -#ifdef CONFIG_PM_SLEEP - .freeze = virtio_ccw_freeze, - .thaw = virtio_ccw_restore, - .restore = virtio_ccw_restore, -#endif }; static int __init pure_hex(char **cp, unsigned int *val, int min_digit, -- 2.25.4
2017 Dec 18
3
[PATCH] virtio/s390: fixup for implement PM operations for virtio_ccw
...;dev); @@ -1333,6 +1334,7 @@ static int virtio_ccw_restore(struct ccw_device *cdev) return virtio_device_restore(&vcdev->vdev); } +#endif static struct ccw_driver virtio_ccw_driver = { .driver = { @@ -1346,9 +1348,11 @@ static struct ccw_driver virtio_ccw_driver = { .set_online = virtio_ccw_online, .notify = virtio_ccw_cio_notify, .int_class = IRQIO_VIR, +#ifdef CONFIG_PM_SLEEP .freeze = virtio_ccw_freeze, .thaw = virtio_ccw_restore, .restore = virtio_ccw_restore, +#endif }; static int __init pure_hex(char **cp, unsigned int *val, int min_digit, -- 2.13.4
2017 Dec 18
3
[PATCH] virtio/s390: fixup for implement PM operations for virtio_ccw
...;dev); @@ -1333,6 +1334,7 @@ static int virtio_ccw_restore(struct ccw_device *cdev) return virtio_device_restore(&vcdev->vdev); } +#endif static struct ccw_driver virtio_ccw_driver = { .driver = { @@ -1346,9 +1348,11 @@ static struct ccw_driver virtio_ccw_driver = { .set_online = virtio_ccw_online, .notify = virtio_ccw_cio_notify, .int_class = IRQIO_VIR, +#ifdef CONFIG_PM_SLEEP .freeze = virtio_ccw_freeze, .thaw = virtio_ccw_restore, .restore = virtio_ccw_restore, +#endif }; static int __init pure_hex(char **cp, unsigned int *val, int min_digit, -- 2.13.4
2018 Feb 12
2
[PULL v2 1/1] virtio/s390: implement PM operations for virtio_ccw
...urn ret; > + > + return virtio_device_restore(&vcdev->vdev); > +} > +#endif > + > static struct ccw_driver virtio_ccw_driver = { > .driver = { > .owner = THIS_MODULE, > @@ -1324,6 +1348,11 @@ static struct ccw_driver virtio_ccw_driver = { > .set_online = virtio_ccw_online, > .notify = virtio_ccw_cio_notify, > .int_class = IRQIO_VIR, > +#ifdef CONFIG_PM_SLEEP > + .freeze = virtio_ccw_freeze, > + .thaw = virtio_ccw_restore, > + .restore = virtio_ccw_restore, > +#endif > }; > > static int __init pure_hex(char **cp, unsigned int *val...
2018 Feb 12
2
[PULL v2 1/1] virtio/s390: implement PM operations for virtio_ccw
...urn ret; > + > + return virtio_device_restore(&vcdev->vdev); > +} > +#endif > + > static struct ccw_driver virtio_ccw_driver = { > .driver = { > .owner = THIS_MODULE, > @@ -1324,6 +1348,11 @@ static struct ccw_driver virtio_ccw_driver = { > .set_online = virtio_ccw_online, > .notify = virtio_ccw_cio_notify, > .int_class = IRQIO_VIR, > +#ifdef CONFIG_PM_SLEEP > + .freeze = virtio_ccw_freeze, > + .thaw = virtio_ccw_restore, > + .restore = virtio_ccw_restore, > +#endif > }; > > static int __init pure_hex(char **cp, unsigned int *val...
2014 Dec 04
1
[PATCH RFC 2/3] virtio_ccw: legacy: don't negotiate rev 1/features
...> rc = le32_to_cpu(features->features); > > + if (vcdev->revision == 0) > + goto out_free; > + > /* Read second half of the feature bits from the host. */ > features->index = 1; > ccw->cmd_code = CCW_CMD_READ_FEAT; > @@ -1182,9 +1185,13 @@ static int virtio_ccw_online(struct ccw_device *cdev) > vcdev->vdev.id.vendor = cdev->id.cu_type; > vcdev->vdev.id.device = cdev->id.cu_model; > > - ret = virtio_ccw_set_transport_rev(vcdev); > - if (ret) > - goto out_free; > + if (virtio_device_is_legacy_only(vcdev->vdev.id)) { Inver...
2014 Dec 04
1
[PATCH RFC 2/3] virtio_ccw: legacy: don't negotiate rev 1/features
...> rc = le32_to_cpu(features->features); > > + if (vcdev->revision == 0) > + goto out_free; > + > /* Read second half of the feature bits from the host. */ > features->index = 1; > ccw->cmd_code = CCW_CMD_READ_FEAT; > @@ -1182,9 +1185,13 @@ static int virtio_ccw_online(struct ccw_device *cdev) > vcdev->vdev.id.vendor = cdev->id.cu_type; > vcdev->vdev.id.device = cdev->id.cu_model; > > - ret = virtio_ccw_set_transport_rev(vcdev); > - if (ret) > - goto out_free; > + if (virtio_device_is_legacy_only(vcdev->vdev.id)) { Inver...
2014 Oct 07
0
[PATCH RFC 09/11] KVM: s390: Set virtio-ccw transport revision
...>revision == 0) + /* + * The host device does not support setting + * the revision: let's operate it in legacy + * mode. + */ + ret = 0; + else + vcdev->revision--; + } + } while (ret == -EOPNOTSUPP); + + kfree(ccw); + kfree(rev); + return ret; +} static int virtio_ccw_online(struct ccw_device *cdev) { @@ -1093,6 +1151,11 @@ static int virtio_ccw_online(struct ccw_device *cdev) spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); vcdev->vdev.id.vendor = cdev->id.cu_type; vcdev->vdev.id.device = cdev->id.cu_model; + + ret = virtio_ccw_set_transport_re...
2019 Apr 26
0
[PATCH 02/10] virtio/s390: DMA support for virtio-ccw
..._used() - * which aren't available in packed ring currently. + * There shouldn't be anything that precludes supporting packed. + * TODO: Remove the limitation after having another look into this. */ __virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED); } @@ -1258,6 +1257,16 @@ static int virtio_ccw_online(struct ccw_device *cdev) ret = -ENOMEM; goto out_free; } + + vcdev->vdev.dev.parent = &cdev->dev; + cdev->dev.dma_mask = &vcdev->dma_mask; + /* we are fine with common virtio infrastructure using 64 bit DMA */ + ret = dma_set_mask_and_coherent(&cdev->dev, DMA_BIT_...
2017 Dec 18
2
[PULL v2 0/1] s390/virtio update
The following changes since commit 20677394b78ed4c4baa09c9a1bcfdf24d2b09fe4: Merge branch 'vhost' into vhost-next (2017-12-18 08:21:38 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/virtio-s390-20171218-v2 for you to fetch changes up to 352d303fa99330e5d197afcc28b5270734e5c541: virtio/s390: implement PM
2017 Dec 18
2
[PULL v2 0/1] s390/virtio update
The following changes since commit 20677394b78ed4c4baa09c9a1bcfdf24d2b09fe4: Merge branch 'vhost' into vhost-next (2017-12-18 08:21:38 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/virtio-s390-20171218-v2 for you to fetch changes up to 352d303fa99330e5d197afcc28b5270734e5c541: virtio/s390: implement PM
2019 Apr 09
0
[RFC PATCH 02/12] virtio/s390: DMA support for virtio-ccw
...each_drv+0x7a/0xc0 > [<00000000007ea23c>] __device_attach+0xfc/0x180 > [<00000000007e9116>] bus_probe_device+0xae/0xc8 > [<00000000007e5066>] device_add+0x3fe/0x698 > [<00000000007a5d92>] register_virtio_device+0xca/0x120 > [<00000000009195a2>] virtio_ccw_online+0x1b2/0x220 > [<000000000089853e>] ccw_device_set_online+0x1d6/0x4d8 > [<0000000000918cf6>] virtio_ccw_auto_online+0x26/0x58 > [<00000000001a61b6>] async_run_entry_fn+0x5e/0x158 > [<0000000000199322>] process_one_work+0x25a/0x668 > [<0000000000199...
2019 May 13
4
[PATCH 06/10] s390/cio: add basic protected virtualization support
...rtio_ccw.c > +++ b/drivers/s390/virtio/virtio_ccw.c > @@ -66,7 +66,6 @@ struct virtio_ccw_device { > bool device_lost; > unsigned int config_ready; > void *airq_info; > - u64 dma_mask; > }; > > struct vq_info_block_legacy { > @@ -1255,16 +1254,7 @@ static int virtio_ccw_online(struct ccw_device *cdev) > ret = -ENOMEM; > goto out_free; > } > - > vcdev->vdev.dev.parent = &cdev->dev; > - cdev->dev.dma_mask = &vcdev->dma_mask; > - /* we are fine with common virtio infrastructure using 64 bit DMA */ > - ret = dma_set_mask_...
2019 May 13
4
[PATCH 06/10] s390/cio: add basic protected virtualization support
...rtio_ccw.c > +++ b/drivers/s390/virtio/virtio_ccw.c > @@ -66,7 +66,6 @@ struct virtio_ccw_device { > bool device_lost; > unsigned int config_ready; > void *airq_info; > - u64 dma_mask; > }; > > struct vq_info_block_legacy { > @@ -1255,16 +1254,7 @@ static int virtio_ccw_online(struct ccw_device *cdev) > ret = -ENOMEM; > goto out_free; > } > - > vcdev->vdev.dev.parent = &cdev->dev; > - cdev->dev.dma_mask = &vcdev->dma_mask; > - /* we are fine with common virtio infrastructure using 64 bit DMA */ > - ret = dma_set_mask_...
2019 Apr 26
0
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...+1269,8 @@ static int virtio_ccw_set_transport_rev(struct virtio_ccw_device *vcdev) } } while (ret == -EOPNOTSUPP); - kfree(ccw); - kfree(rev); + vc_dma_free_struct(&vcdev->vdev, ccw); + vc_dma_free_struct(&vcdev->vdev, rev); return ret; } @@ -1265,14 +1287,9 @@ static int virtio_ccw_online(struct ccw_device *cdev) goto out_free; } vcdev->vdev.dev.parent = &cdev->dev; - vcdev->config_block = kzalloc(sizeof(*vcdev->config_block), - GFP_DMA | GFP_KERNEL); - if (!vcdev->config_block) { - ret = -ENOMEM; - goto out_free; - } - vcdev->status = kzalloc(si...
2019 May 23
0
[PATCH v2 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...+1270,8 @@ static int virtio_ccw_set_transport_rev(struct virtio_ccw_device *vcdev) } } while (ret == -EOPNOTSUPP); - kfree(ccw); - kfree(rev); + vc_dma_free_struct(&vcdev->vdev, ccw); + vc_dma_free_struct(&vcdev->vdev, rev); return ret; } @@ -1266,14 +1288,9 @@ static int virtio_ccw_online(struct ccw_device *cdev) goto out_free; } vcdev->vdev.dev.parent = &cdev->dev; - vcdev->config_block = kzalloc(sizeof(*vcdev->config_block), - GFP_DMA | GFP_KERNEL); - if (!vcdev->config_block) { - ret = -ENOMEM; - goto out_free; - } - vcdev->status = kzalloc(si...
2014 Dec 04
5
[PATCH RFC 1/3] virtio: add API to detect legacy devices
transports need to be able to detect legacy-only devices (ATM balloon only) to use legacy path to drive them. Add a core API to do just that. The implementation just blacklists balloon: not too pretty, but let's not over-engineer. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio.h | 2 ++ drivers/virtio/virtio.c | 6 ++++++ 2 files changed, 8
2019 May 29
0
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...+1270,8 @@ static int virtio_ccw_set_transport_rev(struct virtio_ccw_device *vcdev) } } while (ret == -EOPNOTSUPP); - kfree(ccw); - kfree(rev); + vc_dma_free_struct(&vcdev->vdev, ccw); + vc_dma_free_struct(&vcdev->vdev, rev); return ret; } @@ -1266,14 +1288,9 @@ static int virtio_ccw_online(struct ccw_device *cdev) goto out_free; } vcdev->vdev.dev.parent = &cdev->dev; - vcdev->config_block = kzalloc(sizeof(*vcdev->config_block), - GFP_DMA | GFP_KERNEL); - if (!vcdev->config_block) { - ret = -ENOMEM; - goto out_free; - } - vcdev->status = kzalloc(si...