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