Lines Matching refs:a
446 struct fw_cdev_get_info *a = &arg->get_info; in ioctl_get_info() local
450 client->version = a->version; in ioctl_get_info()
451 a->version = FW_CDEV_KERNEL_VERSION; in ioctl_get_info()
452 a->card = client->device->card->index; in ioctl_get_info()
456 if (a->rom != 0) { in ioctl_get_info()
457 size_t want = a->rom_length; in ioctl_get_info()
460 ret = copy_to_user(u64_to_uptr(a->rom), in ioctl_get_info()
463 a->rom_length = client->device->config_rom_length * 4; in ioctl_get_info()
472 client->bus_reset_closure = a->bus_reset_closure; in ioctl_get_info()
473 if (a->bus_reset != 0) { in ioctl_get_info()
476 ret = copy_to_user(u64_to_uptr(a->bus_reset), &bus_reset, 36); in ioctl_get_info()
776 struct fw_cdev_allocate *a = &arg->allocate; in ioctl_allocate() local
785 region.start = a->offset; in ioctl_allocate()
787 region.end = a->offset + a->length; in ioctl_allocate()
789 region.end = a->region_end; in ioctl_allocate()
791 r->handler.length = a->length; in ioctl_allocate()
794 r->closure = a->closure; in ioctl_allocate()
802 a->offset = r->handler.offset; in ioctl_allocate()
810 a->handle = r->resource.handle; in ioctl_allocate()
823 struct fw_cdev_send_response *a = &arg->send_response; in ioctl_send_response() local
828 if (release_client_resource(client, a->handle, in ioctl_send_response()
837 if (a->length != fw_get_response_length(r->request)) { in ioctl_send_response()
842 if (copy_from_user(r->data, u64_to_uptr(a->data), a->length)) { in ioctl_send_response()
847 fw_send_response(r->card, r->request, a->rcode); in ioctl_send_response()
874 struct fw_cdev_add_descriptor *a = &arg->add_descriptor; in ioctl_add_descriptor() local
882 if (a->length > 256) in ioctl_add_descriptor()
885 r = kmalloc(sizeof(*r) + a->length * 4, GFP_KERNEL); in ioctl_add_descriptor()
889 if (copy_from_user(r->data, u64_to_uptr(a->data), a->length * 4)) { in ioctl_add_descriptor()
894 r->descriptor.length = a->length; in ioctl_add_descriptor()
895 r->descriptor.immediate = a->immediate; in ioctl_add_descriptor()
896 r->descriptor.key = a->key; in ioctl_add_descriptor()
909 a->handle = r->resource.handle; in ioctl_add_descriptor()
971 struct fw_cdev_create_iso_context *a = &arg->create_iso_context; in ioctl_create_iso_context() local
981 switch (a->type) { in ioctl_create_iso_context()
983 if (a->speed > SCODE_3200 || a->channel > 63) in ioctl_create_iso_context()
990 if (a->header_size < 4 || (a->header_size & 3) || in ioctl_create_iso_context()
991 a->channel > 63) in ioctl_create_iso_context()
1005 context = fw_iso_context_create(client->device->card, a->type, in ioctl_create_iso_context()
1006 a->channel, a->speed, a->header_size, cb, client); in ioctl_create_iso_context()
1032 client->iso_closure = a->closure; in ioctl_create_iso_context()
1036 a->handle = 0; in ioctl_create_iso_context()
1043 struct fw_cdev_set_iso_channels *a = &arg->set_iso_channels; in ioctl_set_iso_channels() local
1046 if (ctx == NULL || a->handle != 0) in ioctl_set_iso_channels()
1049 return fw_iso_context_set_channels(ctx, &a->channels); in ioctl_set_iso_channels()
1062 struct fw_cdev_queue_iso *a = &arg->queue_iso; in ioctl_queue_iso() local
1073 if (ctx == NULL || a->handle != 0) in ioctl_queue_iso()
1085 payload = (unsigned long)a->data - client->vm_start; in ioctl_queue_iso()
1087 if (a->data == 0 || client->buffer.pages == NULL || in ioctl_queue_iso()
1096 p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(a->packets); in ioctl_queue_iso()
1097 if (!access_ok(VERIFY_READ, p, a->size)) in ioctl_queue_iso()
1100 end = (void __user *)p + a->size; in ioctl_queue_iso()
1155 a->size -= uptr_to_u64(p) - a->packets; in ioctl_queue_iso()
1156 a->packets = uptr_to_u64(p); in ioctl_queue_iso()
1157 a->data = client->vm_start + payload; in ioctl_queue_iso()
1164 struct fw_cdev_start_iso *a = &arg->start_iso; in ioctl_start_iso() local
1173 if (client->iso_context == NULL || a->handle != 0) in ioctl_start_iso()
1177 (a->tags == 0 || a->tags > 15 || a->sync > 15)) in ioctl_start_iso()
1181 a->cycle, a->sync, a->tags); in ioctl_start_iso()
1186 struct fw_cdev_stop_iso *a = &arg->stop_iso; in ioctl_stop_iso() local
1188 if (client->iso_context == NULL || a->handle != 0) in ioctl_stop_iso()
1196 struct fw_cdev_flush_iso *a = &arg->flush_iso; in ioctl_flush_iso() local
1198 if (client->iso_context == NULL || a->handle != 0) in ioctl_flush_iso()
1206 struct fw_cdev_get_cycle_timer2 *a = &arg->get_cycle_timer2; in ioctl_get_cycle_timer2() local
1216 switch (a->clk_id) { in ioctl_get_cycle_timer2()
1226 a->tv_sec = ts.tv_sec; in ioctl_get_cycle_timer2()
1227 a->tv_nsec = ts.tv_nsec; in ioctl_get_cycle_timer2()
1228 a->cycle_timer = cycle_time; in ioctl_get_cycle_timer2()
1235 struct fw_cdev_get_cycle_timer *a = &arg->get_cycle_timer; in ioctl_get_cycle_timer() local
1241 a->local_time = ct2.tv_sec * USEC_PER_SEC + ct2.tv_nsec / NSEC_PER_USEC; in ioctl_get_cycle_timer()
1242 a->cycle_timer = ct2.cycle_timer; in ioctl_get_cycle_timer()
1454 struct fw_cdev_send_request *a = &arg->send_request; in ioctl_send_broadcast_request() local
1456 switch (a->tcode) { in ioctl_send_broadcast_request()
1465 if (a->offset < CSR_REGISTER_BASE + CSR_CONFIG_ROM_END) in ioctl_send_broadcast_request()
1468 return init_request(client, a, LOCAL_BUS | 0x3f, SCODE_100); in ioctl_send_broadcast_request()
1473 struct fw_cdev_send_stream_packet *a = &arg->send_stream_packet; in ioctl_send_stream_packet() local
1477 if (a->speed > client->device->card->link_speed || in ioctl_send_stream_packet()
1478 a->length > 1024 << a->speed) in ioctl_send_stream_packet()
1481 if (a->tag > 3 || a->channel > 63 || a->sy > 15) in ioctl_send_stream_packet()
1484 dest = fw_stream_packet_destination_id(a->tag, a->channel, a->sy); in ioctl_send_stream_packet()
1486 request.length = a->length; in ioctl_send_stream_packet()
1487 request.closure = a->closure; in ioctl_send_stream_packet()
1488 request.data = a->data; in ioctl_send_stream_packet()
1489 request.generation = a->generation; in ioctl_send_stream_packet()
1491 return init_request(client, &request, dest, a->speed); in ioctl_send_stream_packet()
1522 struct fw_cdev_send_phy_packet *a = &arg->send_phy_packet; in ioctl_send_phy_packet() local
1537 e->p.generation = a->generation; in ioctl_send_phy_packet()
1539 e->p.header[1] = a->data[0]; in ioctl_send_phy_packet()
1540 e->p.header[2] = a->data[1]; in ioctl_send_phy_packet()
1543 e->phy_packet.closure = a->closure; in ioctl_send_phy_packet()
1545 if (is_ping_packet(a->data)) in ioctl_send_phy_packet()
1555 struct fw_cdev_receive_phy_packets *a = &arg->receive_phy_packets; in ioctl_receive_phy_packets() local
1565 client->phy_receiver_closure = a->closure; in ioctl_receive_phy_packets()