Lines Matching defs:cdev

60 	struct ccw_device *cdev;
313 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
318 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
331 spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
332 ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
338 spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
356 thinint_area = ccw_device_dma_zalloc(vcdev->cdev,
368 indicatorp = ccw_device_dma_zalloc(vcdev->cdev,
385 dev_info(&vcdev->cdev->dev,
389 ccw_device_dma_free(vcdev->cdev, indicatorp, sizeof(indicators(vcdev)));
390 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area));
400 ccw_device_get_schid(vcdev->cdev, &schid);
478 ccw_device_dma_free(vcdev->cdev, info->info_block,
489 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
498 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
523 dev_warn(&vcdev->cdev->dev, "no info\n");
527 info->info_block = ccw_device_dma_zalloc(vcdev->cdev,
530 dev_warn(&vcdev->cdev->dev, "no info block\n");
546 dev_warn(&vcdev->cdev->dev, "no vq\n");
577 dev_warn(&vcdev->cdev->dev, "SET_VQ failed\n");
595 ccw_device_dma_free(vcdev->cdev, info->info_block,
611 thinint_area = ccw_device_dma_zalloc(vcdev->cdev,
644 dev_warn(&vcdev->cdev->dev,
649 ccw_device_dma_free(vcdev->cdev, thinint_area, sizeof(*thinint_area));
665 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
689 indicatorp = ccw_device_dma_zalloc(vcdev->cdev,
723 ccw_device_dma_free(vcdev->cdev, indicatorp,
725 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
729 ccw_device_dma_free(vcdev->cdev, indicatorp,
731 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
741 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
754 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
765 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
769 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features));
802 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features));
803 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
828 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
832 features = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*features));
867 ccw_device_dma_free(vcdev->cdev, features, sizeof(*features));
868 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
882 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
886 config_area = ccw_device_dma_zalloc(vcdev->cdev,
909 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE);
910 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
922 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
926 config_area = ccw_device_dma_zalloc(vcdev->cdev,
946 ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE);
947 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
959 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
974 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
986 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
1004 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
1011 return dev_name(&vcdev->cdev->dev);
1062 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area,
1120 dev_warn(&vcdev->cdev->dev,
1128 static void virtio_ccw_int_handler(struct ccw_device *cdev,
1133 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
1198 static int virtio_ccw_check_autoonline(struct ccw_device *cdev)
1202 ccw_device_get_id(cdev, &id);
1210 struct ccw_device *cdev = data;
1213 ret = ccw_device_set_online(cdev);
1215 dev_warn(&cdev->dev, "Failed to set online: %d\n", ret);
1218 static int virtio_ccw_probe(struct ccw_device *cdev)
1220 cdev->handler = virtio_ccw_int_handler;
1222 if (virtio_ccw_check_autoonline(cdev))
1223 async_schedule(virtio_ccw_auto_online, cdev);
1227 static struct virtio_ccw_device *virtio_grab_drvdata(struct ccw_device *cdev)
1232 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1233 vcdev = dev_get_drvdata(&cdev->dev);
1235 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1239 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1243 static void virtio_ccw_remove(struct ccw_device *cdev)
1246 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev);
1248 if (vcdev && cdev->online) {
1252 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1253 dev_set_drvdata(&cdev->dev, NULL);
1254 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1256 cdev->handler = NULL;
1259 static int virtio_ccw_offline(struct ccw_device *cdev)
1262 struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev);
1269 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1270 dev_set_drvdata(&cdev->dev, NULL);
1271 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1281 ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
1284 rev = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*rev));
1286 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
1316 ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw));
1317 ccw_device_dma_free(vcdev->cdev, rev, sizeof(*rev));
1321 static int virtio_ccw_online(struct ccw_device *cdev)
1329 dev_warn(&cdev->dev, "Could not get memory for virtio\n");
1333 vcdev->vdev.dev.parent = &cdev->dev;
1334 vcdev->cdev = cdev;
1335 vcdev->dma_area = ccw_device_dma_zalloc(vcdev->cdev,
1352 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1353 dev_set_drvdata(&cdev->dev, vcdev);
1354 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1355 vcdev->vdev.id.vendor = cdev->id.cu_type;
1356 vcdev->vdev.id.device = cdev->id.cu_model;
1364 dev_warn(&cdev->dev, "Failed to register virtio device: %d\n",
1370 spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
1371 dev_set_drvdata(&cdev->dev, NULL);
1372 spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
1377 ccw_device_dma_free(vcdev->cdev, vcdev->dma_area,
1384 static int virtio_ccw_cio_notify(struct ccw_device *cdev, int event)
1387 struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);