Lines Matching defs:dev
235 iu->dma = ib_dma_map_single(host->srp_dev->dev, iu->buf, size,
237 if (ib_dma_mapping_error(host->srp_dev->dev, iu->dma))
258 ib_dma_unmap_single(host->srp_dev->dev, iu->dma, iu->size,
280 ret = ib_find_cached_pkey(target->srp_host->srp_dev->dev,
308 new_cm_id = ib_create_cm_id(target->srp_host->srp_dev->dev,
316 if (rdma_cap_opa_ah(target->srp_host->srp_dev->dev,
439 dev_name(&device->dev));
499 struct srp_device *dev = target->srp_host->srp_dev;
501 return srp_create_fr_pool(dev->dev, dev->pd, target->mr_pool_size,
502 dev->max_pages_per_mr);
526 struct srp_device *dev = target->srp_host->srp_dev;
527 const struct ib_device_attr *attr = &dev->dev->attrs;
532 const int m = 1 + dev->use_fast_reg * target->mr_per_cmd * 2;
540 recv_cq = ib_alloc_cq(dev->dev, ch, target->queue_size + 1,
547 send_cq = ib_alloc_cq(dev->dev, ch, m * target->queue_size,
567 ret = rdma_create_qp(ch->rdma_cm.cm_id, dev->pd, init_attr);
570 qp = ib_create_qp(dev->pd, init_attr);
580 pr_err("QP creation failed for dev %s: %d\n",
581 dev_name(&dev->dev->dev), ret);
585 if (dev->use_fast_reg) {
606 if (dev->use_fast_reg) {
639 struct srp_device *dev = target->srp_host->srp_dev;
661 if (dev->use_fast_reg) {
721 target->srp_host->srp_dev->dev,
784 ret = ib_query_port(host->srp_dev->dev, host->port, &attr);
790 dev_name(&host->srp_dev->dev->dev), subnet_timeout);
907 memcpy(ipi + 8, &target->srp_host->srp_dev->dev->node_guid, 8);
966 struct srp_device *dev = target->srp_host->srp_dev;
967 struct ib_device *ibdev = dev->dev;
985 struct ib_device *ibdev = srp_dev->dev;
1181 struct srp_device *dev = target->srp_host->srp_dev;
1182 struct ib_device *ibdev = dev->dev;
1190 if (dev->use_fast_reg) {
1426 struct srp_device *dev = target->srp_host->srp_dev;
1439 WARN_ON_ONCE(!dev->use_fast_reg);
1460 dev->mr_page_size);
1555 struct srp_device *dev = target->srp_host->srp_dev;
1569 if (dev->use_fast_reg) {
1593 struct srp_device *dev = ch->target->srp_host->srp_dev;
1600 if (dev->use_fast_reg)
1627 struct srp_device *dev;
1653 dev = target->srp_host->srp_dev;
1654 ibdev = dev->dev;
1715 if (dev->use_fast_reg)
1996 struct ib_device *dev = target->srp_host->srp_dev->dev;
2013 ib_dma_sync_single_for_cpu(dev, iu->dma, len, DMA_TO_DEVICE);
2015 ib_dma_sync_single_for_device(dev, iu->dma, len, DMA_TO_DEVICE);
2064 struct ib_device *dev = target->srp_host->srp_dev->dev;
2073 ib_dma_sync_single_for_cpu(dev, iu->dma, ch->max_ti_iu_len,
2110 ib_dma_sync_single_for_device(dev, iu->dma, ch->max_ti_iu_len,
2159 struct ib_device *dev;
2179 dev = target->srp_host->srp_dev->dev;
2180 ib_dma_sync_single_for_cpu(dev, iu->dma, ch->max_it_iu_len,
2215 ib_dma_sync_single_for_device(dev, iu->dma, ch->max_it_iu_len,
2719 struct ib_device *dev = target->srp_host->srp_dev->dev;
2744 ib_dma_sync_single_for_cpu(dev, iu->dma, sizeof *tsk_mgmt,
2761 ib_dma_sync_single_for_device(dev, iu->dma, sizeof *tsk_mgmt,
2839 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2862 static ssize_t id_ext_show(struct device *dev, struct device_attribute *attr,
2865 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2872 static ssize_t ioc_guid_show(struct device *dev, struct device_attribute *attr,
2875 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2882 static ssize_t service_id_show(struct device *dev,
2885 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2895 static ssize_t pkey_show(struct device *dev, struct device_attribute *attr,
2898 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2908 static ssize_t sgid_show(struct device *dev, struct device_attribute *attr,
2911 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2918 static ssize_t dgid_show(struct device *dev, struct device_attribute *attr,
2921 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2932 static ssize_t orig_dgid_show(struct device *dev, struct device_attribute *attr,
2935 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2945 static ssize_t req_lim_show(struct device *dev, struct device_attribute *attr,
2948 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2962 static ssize_t zero_req_lim_show(struct device *dev,
2965 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2972 static ssize_t local_ib_port_show(struct device *dev,
2975 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2982 static ssize_t local_ib_device_show(struct device *dev,
2985 struct srp_target_port *target = host_to_target(class_to_shost(dev));
2988 dev_name(&target->srp_host->srp_dev->dev->dev));
2993 static ssize_t ch_count_show(struct device *dev, struct device_attribute *attr,
2996 struct srp_target_port *target = host_to_target(class_to_shost(dev));
3003 static ssize_t comp_vector_show(struct device *dev,
3006 struct srp_target_port *target = host_to_target(class_to_shost(dev));
3013 static ssize_t tl_retry_count_show(struct device *dev,
3016 struct srp_target_port *target = host_to_target(class_to_shost(dev));
3023 static ssize_t cmd_sg_entries_show(struct device *dev,
3026 struct srp_target_port *target = host_to_target(class_to_shost(dev));
3033 static ssize_t allow_ext_sg_show(struct device *dev,
3036 struct srp_target_port *target = host_to_target(class_to_shost(dev));
3117 if (scsi_add_host(target->scsi_host, host->srp_dev->dev->dev.parent))
3160 static void srp_release_dev(struct device *dev)
3163 container_of(dev, struct srp_host, dev);
3681 static ssize_t add_target_store(struct device *dev,
3686 container_of(dev, struct srp_host, dev);
3691 struct ib_device *ibdev = srp_dev->dev;
3928 static ssize_t ibdev_show(struct device *dev, struct device_attribute *attr,
3931 struct srp_host *host = container_of(dev, struct srp_host, dev);
3933 return sysfs_emit(buf, "%s\n", dev_name(&host->srp_dev->dev->dev));
3938 static ssize_t port_show(struct device *dev, struct device_attribute *attr,
3941 struct srp_host *host = container_of(dev, struct srp_host, dev);
3969 device_initialize(&host->dev);
3970 host->dev.class = &srp_class;
3971 host->dev.parent = device->dev->dev.parent;
3972 if (dev_set_name(&host->dev, "srp-%s-%u", dev_name(&device->dev->dev),
3975 if (device_add(&host->dev))
3981 device_del(&host->dev);
3982 put_device(&host->dev);
3995 dev_name(&device->dev), host->port);
3996 device_rename(&host->dev, name);
4033 dev_warn(&device->dev, "FR is not supported\n");
4049 dev_name(&device->dev), mr_page_shift, attr->max_mr_size,
4055 srp_dev->dev = device;
4092 device_del(&host->dev);
4110 put_device(&host->dev);