Lines Matching refs:vcdev

75 static inline unsigned long *indicators(struct virtio_ccw_device *vcdev)  in indicators()  argument
77 return &vcdev->dma_area->indicators; in indicators()
80 static inline unsigned long *indicators2(struct virtio_ccw_device *vcdev) in indicators2() argument
82 return &vcdev->dma_area->indicators2; in indicators2()
296 static void virtio_ccw_drop_indicators(struct virtio_ccw_device *vcdev) in virtio_ccw_drop_indicators() argument
300 if (!vcdev->airq_info) in virtio_ccw_drop_indicators()
302 list_for_each_entry(info, &vcdev->virtqueues, node) in virtio_ccw_drop_indicators()
303 drop_airq_indicator(info->vq, vcdev->airq_info); in virtio_ccw_drop_indicators()
306 static int doing_io(struct virtio_ccw_device *vcdev, __u32 flag) in doing_io() argument
311 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); in doing_io()
312 if (vcdev->err) in doing_io()
315 ret = vcdev->curr_io & flag; in doing_io()
316 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); in doing_io()
320 static int ccw_io_helper(struct virtio_ccw_device *vcdev, in ccw_io_helper() argument
327 mutex_lock(&vcdev->io_lock); in ccw_io_helper()
329 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); in ccw_io_helper()
330 ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0); in ccw_io_helper()
332 if (!vcdev->curr_io) in ccw_io_helper()
333 vcdev->err = 0; in ccw_io_helper()
334 vcdev->curr_io |= flag; in ccw_io_helper()
336 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); in ccw_io_helper()
339 wait_event(vcdev->wait_q, doing_io(vcdev, flag) == 0); in ccw_io_helper()
340 ret = ret ? ret : vcdev->err; in ccw_io_helper()
341 mutex_unlock(&vcdev->io_lock); in ccw_io_helper()
345 static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, in virtio_ccw_drop_indicator() argument
351 struct airq_info *airq_info = vcdev->airq_info; in virtio_ccw_drop_indicator()
353 if (vcdev->is_thinint) { in virtio_ccw_drop_indicator()
354 thinint_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_drop_indicator()
366 indicatorp = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_drop_indicator()
367 sizeof(indicators(vcdev))); in virtio_ccw_drop_indicator()
372 ccw->count = sizeof(indicators(vcdev)); in virtio_ccw_drop_indicator()
376 *indicators(vcdev) = 0; in virtio_ccw_drop_indicator()
378 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_drop_indicator()
379 vcdev->is_thinint ? in virtio_ccw_drop_indicator()
383 dev_info(&vcdev->cdev->dev, in virtio_ccw_drop_indicator()
385 else if (vcdev->is_thinint) in virtio_ccw_drop_indicator()
386 virtio_ccw_drop_indicators(vcdev); in virtio_ccw_drop_indicator()
387 ccw_device_dma_free(vcdev->cdev, indicatorp, sizeof(indicators(vcdev))); in virtio_ccw_drop_indicator()
388 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area)); in virtio_ccw_drop_indicator()
419 struct virtio_ccw_device *vcdev; in virtio_ccw_kvm_notify() local
422 vcdev = to_vc_device(info->vq->vdev); in virtio_ccw_kvm_notify()
423 ccw_device_get_schid(vcdev->cdev, &schid); in virtio_ccw_kvm_notify()
430 static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev, in virtio_ccw_read_vq_conf() argument
435 vcdev->dma_area->config_block.index = index; in virtio_ccw_read_vq_conf()
439 ccw->cda = (__u32)(unsigned long)(&vcdev->dma_area->config_block); in virtio_ccw_read_vq_conf()
440 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); in virtio_ccw_read_vq_conf()
443 return vcdev->dma_area->config_block.num ?: -ENOENT; in virtio_ccw_read_vq_conf()
448 struct virtio_ccw_device *vcdev = to_vc_device(vq->vdev); in virtio_ccw_del_vq() local
455 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_del_vq()
457 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_del_vq()
460 if (vcdev->revision == 0) { in virtio_ccw_del_vq()
477 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_del_vq()
488 ccw_device_dma_free(vcdev->cdev, info->info_block, in virtio_ccw_del_vq()
497 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_del_vqs() local
499 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_del_vqs()
503 virtio_ccw_drop_indicator(vcdev, ccw); in virtio_ccw_del_vqs()
508 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_del_vqs()
516 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_setup_vq() local
527 dev_warn(&vcdev->cdev->dev, "no info\n"); in virtio_ccw_setup_vq()
531 info->info_block = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_setup_vq()
534 dev_warn(&vcdev->cdev->dev, "no info block\n"); in virtio_ccw_setup_vq()
538 info->num = virtio_ccw_read_vq_conf(vcdev, ccw, i); in virtio_ccw_setup_vq()
543 may_reduce = vcdev->revision > 0; in virtio_ccw_setup_vq()
550 dev_warn(&vcdev->cdev->dev, "no vq\n"); in virtio_ccw_setup_vq()
559 if (vcdev->revision == 0) { in virtio_ccw_setup_vq()
576 err = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_VQ | i); in virtio_ccw_setup_vq()
578 dev_warn(&vcdev->cdev->dev, "SET_VQ failed\n"); in virtio_ccw_setup_vq()
586 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_setup_vq()
587 list_add(&info->node, &vcdev->virtqueues); in virtio_ccw_setup_vq()
588 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_setup_vq()
596 ccw_device_dma_free(vcdev->cdev, info->info_block, in virtio_ccw_setup_vq()
603 static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev, in virtio_ccw_register_adapter_ind() argument
611 thinint_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_register_adapter_ind()
620 &vcdev->airq_info); in virtio_ccw_register_adapter_ind()
625 info = vcdev->airq_info; in virtio_ccw_register_adapter_ind()
633 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND_ADAPTER); in virtio_ccw_register_adapter_ind()
643 dev_warn(&vcdev->cdev->dev, in virtio_ccw_register_adapter_ind()
645 virtio_ccw_drop_indicators(vcdev); in virtio_ccw_register_adapter_ind()
648 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area)); in virtio_ccw_register_adapter_ind()
659 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_find_vqs() local
664 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_find_vqs()
688 indicatorp = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_find_vqs()
689 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
692 *indicatorp = (unsigned long) indicators(vcdev); in virtio_ccw_find_vqs()
693 if (vcdev->is_thinint) { in virtio_ccw_find_vqs()
694 ret = virtio_ccw_register_adapter_ind(vcdev, vqs, nvqs, ccw); in virtio_ccw_find_vqs()
697 vcdev->is_thinint = false; in virtio_ccw_find_vqs()
699 if (!vcdev->is_thinint) { in virtio_ccw_find_vqs()
701 *indicators(vcdev) = 0; in virtio_ccw_find_vqs()
704 ccw->count = sizeof(indicators(vcdev)); in virtio_ccw_find_vqs()
706 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND); in virtio_ccw_find_vqs()
711 *indicatorp = (unsigned long) indicators2(vcdev); in virtio_ccw_find_vqs()
712 *indicators2(vcdev) = 0; in virtio_ccw_find_vqs()
715 ccw->count = sizeof(indicators2(vcdev)); in virtio_ccw_find_vqs()
717 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND); in virtio_ccw_find_vqs()
722 ccw_device_dma_free(vcdev->cdev, indicatorp, in virtio_ccw_find_vqs()
723 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
724 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_find_vqs()
728 ccw_device_dma_free(vcdev->cdev, indicatorp, in virtio_ccw_find_vqs()
729 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
730 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_find_vqs()
737 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_reset() local
740 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_reset()
745 vcdev->dma_area->status = 0; in virtio_ccw_reset()
752 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_RESET); in virtio_ccw_reset()
753 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_reset()
758 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_features() local
764 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_features()
768 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features)); in virtio_ccw_get_features()
779 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_FEAT); in virtio_ccw_get_features()
787 if (vcdev->revision == 0) in virtio_ccw_get_features()
796 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_FEAT); in virtio_ccw_get_features()
801 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features)); in virtio_ccw_get_features()
802 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_features()
815 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_finalize_features() local
820 if (vcdev->revision >= 1 && in virtio_ccw_finalize_features()
827 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_finalize_features()
831 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features)); in virtio_ccw_finalize_features()
849 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); in virtio_ccw_finalize_features()
853 if (vcdev->revision == 0) in virtio_ccw_finalize_features()
863 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); in virtio_ccw_finalize_features()
866 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features)); in virtio_ccw_finalize_features()
867 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_finalize_features()
875 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_config() local
881 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_config()
885 config_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_get_config()
895 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_CONFIG); in virtio_ccw_get_config()
899 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_get_config()
900 memcpy(vcdev->config, config_area, offset + len); in virtio_ccw_get_config()
901 if (vcdev->config_ready < offset + len) in virtio_ccw_get_config()
902 vcdev->config_ready = offset + len; in virtio_ccw_get_config()
903 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_get_config()
908 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); in virtio_ccw_get_config()
909 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_config()
916 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_set_config() local
921 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_config()
925 config_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_set_config()
931 if (vcdev->config_ready < offset) in virtio_ccw_set_config()
933 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_set_config()
934 memcpy(&vcdev->config[offset], buf, len); in virtio_ccw_set_config()
936 memcpy(config_area, vcdev->config, sizeof(vcdev->config)); in virtio_ccw_set_config()
937 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_set_config()
942 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_CONFIG); in virtio_ccw_set_config()
945 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); in virtio_ccw_set_config()
946 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_config()
951 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_status() local
952 u8 old_status = vcdev->dma_area->status; in virtio_ccw_get_status()
955 if (vcdev->revision < 1) in virtio_ccw_get_status()
956 return vcdev->dma_area->status; in virtio_ccw_get_status()
958 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_status()
964 ccw->count = sizeof(vcdev->dma_area->status); in virtio_ccw_get_status()
965 ccw->cda = (__u32)(unsigned long)&vcdev->dma_area->status; in virtio_ccw_get_status()
966 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_STATUS); in virtio_ccw_get_status()
973 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_status()
975 return vcdev->dma_area->status; in virtio_ccw_get_status()
980 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_set_status() local
981 u8 old_status = vcdev->dma_area->status; in virtio_ccw_set_status()
985 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_status()
990 vcdev->dma_area->status = status; in virtio_ccw_set_status()
994 ccw->cda = (__u32)(unsigned long)&vcdev->dma_area->status; in virtio_ccw_set_status()
995 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_STATUS); in virtio_ccw_set_status()
998 vcdev->dma_area->status = old_status; in virtio_ccw_set_status()
999 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_status()
1004 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_bus_name() local
1006 return dev_name(&vcdev->cdev->dev); in virtio_ccw_bus_name()
1030 struct virtio_ccw_device *vcdev = to_vc_device(dev); in virtio_ccw_release_dev() local
1032 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area, in virtio_ccw_release_dev()
1033 sizeof(*vcdev->dma_area)); in virtio_ccw_release_dev()
1034 kfree(vcdev); in virtio_ccw_release_dev()
1048 static struct virtqueue *virtio_ccw_vq_by_ind(struct virtio_ccw_device *vcdev, in virtio_ccw_vq_by_ind() argument
1056 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_vq_by_ind()
1057 list_for_each_entry(info, &vcdev->virtqueues, node) { in virtio_ccw_vq_by_ind()
1063 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_vq_by_ind()
1067 static void virtio_ccw_check_activity(struct virtio_ccw_device *vcdev, in virtio_ccw_check_activity() argument
1070 if (vcdev->curr_io & activity) { in virtio_ccw_check_activity()
1085 vcdev->curr_io &= ~activity; in virtio_ccw_check_activity()
1086 wake_up(&vcdev->wait_q); in virtio_ccw_check_activity()
1090 dev_warn(&vcdev->cdev->dev, in virtio_ccw_check_activity()
1103 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_int_handler() local
1107 if (!vcdev) in virtio_ccw_int_handler()
1110 vcdev->err = PTR_ERR(irb); in virtio_ccw_int_handler()
1111 virtio_ccw_check_activity(vcdev, activity); in virtio_ccw_int_handler()
1125 vcdev->err = -EOPNOTSUPP; in virtio_ccw_int_handler()
1128 vcdev->err = -EIO; in virtio_ccw_int_handler()
1130 virtio_ccw_check_activity(vcdev, activity); in virtio_ccw_int_handler()
1131 for_each_set_bit(i, indicators(vcdev), in virtio_ccw_int_handler()
1132 sizeof(*indicators(vcdev)) * BITS_PER_BYTE) { in virtio_ccw_int_handler()
1134 clear_bit(i, indicators(vcdev)); in virtio_ccw_int_handler()
1136 vq = virtio_ccw_vq_by_ind(vcdev, i); in virtio_ccw_int_handler()
1139 if (test_bit(0, indicators2(vcdev))) { in virtio_ccw_int_handler()
1140 virtio_config_changed(&vcdev->vdev); in virtio_ccw_int_handler()
1141 clear_bit(0, indicators2(vcdev)); in virtio_ccw_int_handler()
1190 struct virtio_ccw_device *vcdev; in virtio_grab_drvdata() local
1193 vcdev = dev_get_drvdata(&cdev->dev); in virtio_grab_drvdata()
1194 if (!vcdev || vcdev->going_away) { in virtio_grab_drvdata()
1198 vcdev->going_away = true; in virtio_grab_drvdata()
1200 return vcdev; in virtio_grab_drvdata()
1206 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); in virtio_ccw_remove() local
1208 if (vcdev && cdev->online) { in virtio_ccw_remove()
1209 if (vcdev->device_lost) in virtio_ccw_remove()
1210 virtio_break_device(&vcdev->vdev); in virtio_ccw_remove()
1211 unregister_virtio_device(&vcdev->vdev); in virtio_ccw_remove()
1222 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); in virtio_ccw_offline() local
1224 if (!vcdev) in virtio_ccw_offline()
1226 if (vcdev->device_lost) in virtio_ccw_offline()
1227 virtio_break_device(&vcdev->vdev); in virtio_ccw_offline()
1228 unregister_virtio_device(&vcdev->vdev); in virtio_ccw_offline()
1235 static int virtio_ccw_set_transport_rev(struct virtio_ccw_device *vcdev) in virtio_ccw_set_transport_rev() argument
1241 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1244 rev = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*rev)); in virtio_ccw_set_transport_rev()
1246 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1256 vcdev->revision = VIRTIO_CCW_REV_MAX; in virtio_ccw_set_transport_rev()
1258 rev->revision = vcdev->revision; in virtio_ccw_set_transport_rev()
1261 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_set_transport_rev()
1264 if (vcdev->revision == 0) in virtio_ccw_set_transport_rev()
1272 vcdev->revision--; in virtio_ccw_set_transport_rev()
1276 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1277 ccw_device_dma_free(vcdev->cdev, rev, sizeof(*rev)); in virtio_ccw_set_transport_rev()
1284 struct virtio_ccw_device *vcdev; in virtio_ccw_online() local
1287 vcdev = kzalloc(sizeof(*vcdev), GFP_KERNEL); in virtio_ccw_online()
1288 if (!vcdev) { in virtio_ccw_online()
1293 vcdev->vdev.dev.parent = &cdev->dev; in virtio_ccw_online()
1294 vcdev->cdev = cdev; in virtio_ccw_online()
1295 vcdev->dma_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_online()
1296 sizeof(*vcdev->dma_area)); in virtio_ccw_online()
1297 if (!vcdev->dma_area) { in virtio_ccw_online()
1302 vcdev->is_thinint = virtio_ccw_use_airq; /* at least try */ in virtio_ccw_online()
1304 vcdev->vdev.dev.release = virtio_ccw_release_dev; in virtio_ccw_online()
1305 vcdev->vdev.config = &virtio_ccw_config_ops; in virtio_ccw_online()
1306 init_waitqueue_head(&vcdev->wait_q); in virtio_ccw_online()
1307 INIT_LIST_HEAD(&vcdev->virtqueues); in virtio_ccw_online()
1308 spin_lock_init(&vcdev->lock); in virtio_ccw_online()
1309 mutex_init(&vcdev->io_lock); in virtio_ccw_online()
1312 dev_set_drvdata(&cdev->dev, vcdev); in virtio_ccw_online()
1314 vcdev->vdev.id.vendor = cdev->id.cu_type; in virtio_ccw_online()
1315 vcdev->vdev.id.device = cdev->id.cu_model; in virtio_ccw_online()
1317 ret = virtio_ccw_set_transport_rev(vcdev); in virtio_ccw_online()
1321 ret = register_virtio_device(&vcdev->vdev); in virtio_ccw_online()
1332 put_device(&vcdev->vdev.dev); in virtio_ccw_online()
1335 if (vcdev) { in virtio_ccw_online()
1336 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area, in virtio_ccw_online()
1337 sizeof(*vcdev->dma_area)); in virtio_ccw_online()
1339 kfree(vcdev); in virtio_ccw_online()
1346 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_cio_notify() local
1352 if (!vcdev) in virtio_ccw_cio_notify()
1357 vcdev->device_lost = true; in virtio_ccw_cio_notify()
1378 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_freeze() local
1380 return virtio_device_freeze(&vcdev->vdev); in virtio_ccw_freeze()
1385 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_restore() local
1388 ret = virtio_ccw_set_transport_rev(vcdev); in virtio_ccw_restore()
1392 return virtio_device_restore(&vcdev->vdev); in virtio_ccw_restore()