Lines Matching refs:vcdev

77 static inline unsigned long *indicators(struct virtio_ccw_device *vcdev)  in indicators()  argument
79 return &vcdev->dma_area->indicators; in indicators()
82 static inline unsigned long *indicators2(struct virtio_ccw_device *vcdev) in indicators2() argument
84 return &vcdev->dma_area->indicators2; in indicators2()
299 static void virtio_ccw_drop_indicators(struct virtio_ccw_device *vcdev) in virtio_ccw_drop_indicators() argument
303 if (!vcdev->airq_info) in virtio_ccw_drop_indicators()
305 list_for_each_entry(info, &vcdev->virtqueues, node) in virtio_ccw_drop_indicators()
306 drop_airq_indicator(info->vq, vcdev->airq_info); in virtio_ccw_drop_indicators()
309 static int doing_io(struct virtio_ccw_device *vcdev, __u32 flag) in doing_io() argument
314 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); in doing_io()
315 if (vcdev->err) in doing_io()
318 ret = vcdev->curr_io & flag; in doing_io()
319 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); in doing_io()
323 static int ccw_io_helper(struct virtio_ccw_device *vcdev, in ccw_io_helper() argument
330 mutex_lock(&vcdev->io_lock); in ccw_io_helper()
332 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); in ccw_io_helper()
333 ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0); in ccw_io_helper()
335 if (!vcdev->curr_io) in ccw_io_helper()
336 vcdev->err = 0; in ccw_io_helper()
337 vcdev->curr_io |= flag; in ccw_io_helper()
339 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); in ccw_io_helper()
342 wait_event(vcdev->wait_q, doing_io(vcdev, flag) == 0); in ccw_io_helper()
343 ret = ret ? ret : vcdev->err; in ccw_io_helper()
344 mutex_unlock(&vcdev->io_lock); in ccw_io_helper()
348 static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, in virtio_ccw_drop_indicator() argument
354 struct airq_info *airq_info = vcdev->airq_info; in virtio_ccw_drop_indicator()
356 if (vcdev->is_thinint) { in virtio_ccw_drop_indicator()
357 thinint_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_drop_indicator()
369 indicatorp = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_drop_indicator()
370 sizeof(indicators(vcdev))); in virtio_ccw_drop_indicator()
375 ccw->count = sizeof(indicators(vcdev)); in virtio_ccw_drop_indicator()
379 *indicators(vcdev) = 0; in virtio_ccw_drop_indicator()
381 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_drop_indicator()
382 vcdev->is_thinint ? in virtio_ccw_drop_indicator()
386 dev_info(&vcdev->cdev->dev, in virtio_ccw_drop_indicator()
388 else if (vcdev->is_thinint) in virtio_ccw_drop_indicator()
389 virtio_ccw_drop_indicators(vcdev); in virtio_ccw_drop_indicator()
390 ccw_device_dma_free(vcdev->cdev, indicatorp, sizeof(indicators(vcdev))); in virtio_ccw_drop_indicator()
391 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area)); in virtio_ccw_drop_indicator()
397 struct virtio_ccw_device *vcdev; in virtio_ccw_kvm_notify() local
400 vcdev = to_vc_device(info->vq->vdev); in virtio_ccw_kvm_notify()
401 ccw_device_get_schid(vcdev->cdev, &schid); in virtio_ccw_kvm_notify()
411 static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev, in virtio_ccw_read_vq_conf() argument
416 vcdev->dma_area->config_block.index = index; in virtio_ccw_read_vq_conf()
420 ccw->cda = (__u32)(unsigned long)(&vcdev->dma_area->config_block); in virtio_ccw_read_vq_conf()
421 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); in virtio_ccw_read_vq_conf()
424 return vcdev->dma_area->config_block.num ?: -ENOENT; in virtio_ccw_read_vq_conf()
429 struct virtio_ccw_device *vcdev = to_vc_device(vq->vdev); in virtio_ccw_del_vq() local
436 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_del_vq()
438 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_del_vq()
441 if (vcdev->revision == 0) { in virtio_ccw_del_vq()
458 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_del_vq()
469 ccw_device_dma_free(vcdev->cdev, info->info_block, in virtio_ccw_del_vq()
478 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_del_vqs() local
480 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_del_vqs()
484 virtio_ccw_drop_indicator(vcdev, ccw); in virtio_ccw_del_vqs()
489 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_del_vqs()
497 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_setup_vq() local
508 dev_warn(&vcdev->cdev->dev, "no info\n"); in virtio_ccw_setup_vq()
512 info->info_block = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_setup_vq()
515 dev_warn(&vcdev->cdev->dev, "no info block\n"); in virtio_ccw_setup_vq()
519 info->num = virtio_ccw_read_vq_conf(vcdev, ccw, i); in virtio_ccw_setup_vq()
524 may_reduce = vcdev->revision > 0; in virtio_ccw_setup_vq()
531 dev_warn(&vcdev->cdev->dev, "no vq\n"); in virtio_ccw_setup_vq()
543 if (vcdev->revision == 0) { in virtio_ccw_setup_vq()
560 err = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_VQ | i); in virtio_ccw_setup_vq()
562 dev_warn(&vcdev->cdev->dev, "SET_VQ failed\n"); in virtio_ccw_setup_vq()
570 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_setup_vq()
571 list_add(&info->node, &vcdev->virtqueues); in virtio_ccw_setup_vq()
572 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_setup_vq()
580 ccw_device_dma_free(vcdev->cdev, info->info_block, in virtio_ccw_setup_vq()
587 static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev, in virtio_ccw_register_adapter_ind() argument
595 thinint_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_register_adapter_ind()
604 &vcdev->airq_info); in virtio_ccw_register_adapter_ind()
609 info = vcdev->airq_info; in virtio_ccw_register_adapter_ind()
617 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND_ADAPTER); in virtio_ccw_register_adapter_ind()
627 dev_warn(&vcdev->cdev->dev, in virtio_ccw_register_adapter_ind()
629 virtio_ccw_drop_indicators(vcdev); in virtio_ccw_register_adapter_ind()
632 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area)); in virtio_ccw_register_adapter_ind()
643 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_find_vqs() local
648 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_find_vqs()
672 indicatorp = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_find_vqs()
673 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
676 *indicatorp = (unsigned long) indicators(vcdev); in virtio_ccw_find_vqs()
677 if (vcdev->is_thinint) { in virtio_ccw_find_vqs()
678 ret = virtio_ccw_register_adapter_ind(vcdev, vqs, nvqs, ccw); in virtio_ccw_find_vqs()
681 vcdev->is_thinint = false; in virtio_ccw_find_vqs()
683 if (!vcdev->is_thinint) { in virtio_ccw_find_vqs()
685 *indicators(vcdev) = 0; in virtio_ccw_find_vqs()
688 ccw->count = sizeof(indicators(vcdev)); in virtio_ccw_find_vqs()
690 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND); in virtio_ccw_find_vqs()
695 *indicatorp = (unsigned long) indicators2(vcdev); in virtio_ccw_find_vqs()
696 *indicators2(vcdev) = 0; in virtio_ccw_find_vqs()
699 ccw->count = sizeof(indicators2(vcdev)); in virtio_ccw_find_vqs()
701 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND); in virtio_ccw_find_vqs()
706 ccw_device_dma_free(vcdev->cdev, indicatorp, in virtio_ccw_find_vqs()
707 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
708 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_find_vqs()
712 ccw_device_dma_free(vcdev->cdev, indicatorp, in virtio_ccw_find_vqs()
713 sizeof(indicators(vcdev))); in virtio_ccw_find_vqs()
714 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_find_vqs()
721 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_reset() local
724 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_reset()
729 vcdev->dma_area->status = 0; in virtio_ccw_reset()
736 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_RESET); in virtio_ccw_reset()
737 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_reset()
742 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_features() local
748 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_features()
752 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features)); in virtio_ccw_get_features()
763 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_FEAT); in virtio_ccw_get_features()
771 if (vcdev->revision == 0) in virtio_ccw_get_features()
780 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_FEAT); in virtio_ccw_get_features()
785 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features)); in virtio_ccw_get_features()
786 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_features()
799 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_finalize_features() local
804 if (vcdev->revision >= 1 && in virtio_ccw_finalize_features()
811 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_finalize_features()
815 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features)); in virtio_ccw_finalize_features()
833 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); in virtio_ccw_finalize_features()
837 if (vcdev->revision == 0) in virtio_ccw_finalize_features()
847 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); in virtio_ccw_finalize_features()
850 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features)); in virtio_ccw_finalize_features()
851 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_finalize_features()
859 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_config() local
865 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_config()
869 config_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_get_config()
879 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_CONFIG); in virtio_ccw_get_config()
883 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_get_config()
884 memcpy(vcdev->config, config_area, offset + len); in virtio_ccw_get_config()
885 if (vcdev->config_ready < offset + len) in virtio_ccw_get_config()
886 vcdev->config_ready = offset + len; in virtio_ccw_get_config()
887 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_get_config()
892 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); in virtio_ccw_get_config()
893 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_config()
900 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_set_config() local
905 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_config()
909 config_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_set_config()
915 if (vcdev->config_ready < offset) in virtio_ccw_set_config()
917 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_set_config()
918 memcpy(&vcdev->config[offset], buf, len); in virtio_ccw_set_config()
920 memcpy(config_area, vcdev->config, sizeof(vcdev->config)); in virtio_ccw_set_config()
921 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_set_config()
926 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_CONFIG); in virtio_ccw_set_config()
929 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); in virtio_ccw_set_config()
930 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_config()
935 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_get_status() local
936 u8 old_status = vcdev->dma_area->status; in virtio_ccw_get_status()
939 if (vcdev->revision < 2) in virtio_ccw_get_status()
940 return vcdev->dma_area->status; in virtio_ccw_get_status()
942 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_get_status()
948 ccw->count = sizeof(vcdev->dma_area->status); in virtio_ccw_get_status()
949 ccw->cda = (__u32)(unsigned long)&vcdev->dma_area->status; in virtio_ccw_get_status()
950 ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_STATUS); in virtio_ccw_get_status()
957 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_get_status()
959 return vcdev->dma_area->status; in virtio_ccw_get_status()
964 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_set_status() local
965 u8 old_status = vcdev->dma_area->status; in virtio_ccw_set_status()
969 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_status()
974 vcdev->dma_area->status = status; in virtio_ccw_set_status()
978 ccw->cda = (__u32)(unsigned long)&vcdev->dma_area->status; in virtio_ccw_set_status()
983 ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_STATUS); in virtio_ccw_set_status()
986 vcdev->dma_area->status = old_status; in virtio_ccw_set_status()
987 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_status()
992 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_bus_name() local
994 return dev_name(&vcdev->cdev->dev); in virtio_ccw_bus_name()
999 struct virtio_ccw_device *vcdev = to_vc_device(vdev); in virtio_ccw_synchronize_cbs() local
1000 struct airq_info *info = vcdev->airq_info; in virtio_ccw_synchronize_cbs()
1016 write_lock_irq(&vcdev->irq_lock); in virtio_ccw_synchronize_cbs()
1017 write_unlock_irq(&vcdev->irq_lock); in virtio_ccw_synchronize_cbs()
1043 struct virtio_ccw_device *vcdev = to_vc_device(dev); in virtio_ccw_release_dev() local
1045 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area, in virtio_ccw_release_dev()
1046 sizeof(*vcdev->dma_area)); in virtio_ccw_release_dev()
1047 kfree(vcdev); in virtio_ccw_release_dev()
1061 static struct virtqueue *virtio_ccw_vq_by_ind(struct virtio_ccw_device *vcdev, in virtio_ccw_vq_by_ind() argument
1069 spin_lock_irqsave(&vcdev->lock, flags); in virtio_ccw_vq_by_ind()
1070 list_for_each_entry(info, &vcdev->virtqueues, node) { in virtio_ccw_vq_by_ind()
1076 spin_unlock_irqrestore(&vcdev->lock, flags); in virtio_ccw_vq_by_ind()
1080 static void virtio_ccw_check_activity(struct virtio_ccw_device *vcdev, in virtio_ccw_check_activity() argument
1083 if (vcdev->curr_io & activity) { in virtio_ccw_check_activity()
1098 vcdev->curr_io &= ~activity; in virtio_ccw_check_activity()
1099 wake_up(&vcdev->wait_q); in virtio_ccw_check_activity()
1103 dev_warn(&vcdev->cdev->dev, in virtio_ccw_check_activity()
1116 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_int_handler() local
1120 if (!vcdev) in virtio_ccw_int_handler()
1123 vcdev->err = PTR_ERR(irb); in virtio_ccw_int_handler()
1124 virtio_ccw_check_activity(vcdev, activity); in virtio_ccw_int_handler()
1138 vcdev->err = -EOPNOTSUPP; in virtio_ccw_int_handler()
1141 vcdev->err = -EIO; in virtio_ccw_int_handler()
1143 virtio_ccw_check_activity(vcdev, activity); in virtio_ccw_int_handler()
1149 read_lock(&vcdev->irq_lock); in virtio_ccw_int_handler()
1151 for_each_set_bit(i, indicators(vcdev), in virtio_ccw_int_handler()
1152 sizeof(*indicators(vcdev)) * BITS_PER_BYTE) { in virtio_ccw_int_handler()
1154 clear_bit(i, indicators(vcdev)); in virtio_ccw_int_handler()
1156 vq = virtio_ccw_vq_by_ind(vcdev, i); in virtio_ccw_int_handler()
1160 read_unlock(&vcdev->irq_lock); in virtio_ccw_int_handler()
1162 if (test_bit(0, indicators2(vcdev))) { in virtio_ccw_int_handler()
1163 virtio_config_changed(&vcdev->vdev); in virtio_ccw_int_handler()
1164 clear_bit(0, indicators2(vcdev)); in virtio_ccw_int_handler()
1213 struct virtio_ccw_device *vcdev; in virtio_grab_drvdata() local
1216 vcdev = dev_get_drvdata(&cdev->dev); in virtio_grab_drvdata()
1217 if (!vcdev || vcdev->going_away) { in virtio_grab_drvdata()
1221 vcdev->going_away = true; in virtio_grab_drvdata()
1223 return vcdev; in virtio_grab_drvdata()
1229 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); in virtio_ccw_remove() local
1231 if (vcdev && cdev->online) { in virtio_ccw_remove()
1232 if (vcdev->device_lost) in virtio_ccw_remove()
1233 virtio_break_device(&vcdev->vdev); in virtio_ccw_remove()
1234 unregister_virtio_device(&vcdev->vdev); in virtio_ccw_remove()
1245 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev); in virtio_ccw_offline() local
1247 if (!vcdev) in virtio_ccw_offline()
1249 if (vcdev->device_lost) in virtio_ccw_offline()
1250 virtio_break_device(&vcdev->vdev); in virtio_ccw_offline()
1251 unregister_virtio_device(&vcdev->vdev); in virtio_ccw_offline()
1258 static int virtio_ccw_set_transport_rev(struct virtio_ccw_device *vcdev) in virtio_ccw_set_transport_rev() argument
1264 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1267 rev = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*rev)); in virtio_ccw_set_transport_rev()
1269 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1279 vcdev->revision = VIRTIO_CCW_REV_MAX; in virtio_ccw_set_transport_rev()
1281 rev->revision = vcdev->revision; in virtio_ccw_set_transport_rev()
1284 ret = ccw_io_helper(vcdev, ccw, in virtio_ccw_set_transport_rev()
1287 if (vcdev->revision == 0) in virtio_ccw_set_transport_rev()
1295 vcdev->revision--; in virtio_ccw_set_transport_rev()
1299 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); in virtio_ccw_set_transport_rev()
1300 ccw_device_dma_free(vcdev->cdev, rev, sizeof(*rev)); in virtio_ccw_set_transport_rev()
1307 struct virtio_ccw_device *vcdev; in virtio_ccw_online() local
1310 vcdev = kzalloc(sizeof(*vcdev), GFP_KERNEL); in virtio_ccw_online()
1311 if (!vcdev) { in virtio_ccw_online()
1316 vcdev->vdev.dev.parent = &cdev->dev; in virtio_ccw_online()
1317 vcdev->cdev = cdev; in virtio_ccw_online()
1318 vcdev->dma_area = ccw_device_dma_zalloc(vcdev->cdev, in virtio_ccw_online()
1319 sizeof(*vcdev->dma_area)); in virtio_ccw_online()
1320 if (!vcdev->dma_area) { in virtio_ccw_online()
1325 vcdev->is_thinint = virtio_ccw_use_airq; /* at least try */ in virtio_ccw_online()
1327 vcdev->vdev.dev.release = virtio_ccw_release_dev; in virtio_ccw_online()
1328 vcdev->vdev.config = &virtio_ccw_config_ops; in virtio_ccw_online()
1329 init_waitqueue_head(&vcdev->wait_q); in virtio_ccw_online()
1330 INIT_LIST_HEAD(&vcdev->virtqueues); in virtio_ccw_online()
1331 spin_lock_init(&vcdev->lock); in virtio_ccw_online()
1332 rwlock_init(&vcdev->irq_lock); in virtio_ccw_online()
1333 mutex_init(&vcdev->io_lock); in virtio_ccw_online()
1336 dev_set_drvdata(&cdev->dev, vcdev); in virtio_ccw_online()
1338 vcdev->vdev.id.vendor = cdev->id.cu_type; in virtio_ccw_online()
1339 vcdev->vdev.id.device = cdev->id.cu_model; in virtio_ccw_online()
1341 ret = virtio_ccw_set_transport_rev(vcdev); in virtio_ccw_online()
1345 ret = register_virtio_device(&vcdev->vdev); in virtio_ccw_online()
1356 put_device(&vcdev->vdev.dev); in virtio_ccw_online()
1359 if (vcdev) { in virtio_ccw_online()
1360 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area, in virtio_ccw_online()
1361 sizeof(*vcdev->dma_area)); in virtio_ccw_online()
1363 kfree(vcdev); in virtio_ccw_online()
1370 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); in virtio_ccw_cio_notify() local
1376 if (!vcdev) in virtio_ccw_cio_notify()
1381 vcdev->device_lost = true; in virtio_ccw_cio_notify()