Lines Matching refs:hm
89 struct hpi_message hm; in asihpi_hpi_release() local
94 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_hpi_release()
96 hpi_send_recv_ex(&hm, &hr, file); in asihpi_hpi_release()
105 union hpi_message_buffer_v1 *hm; in asihpi_hpi_ioctl() local
115 hm = kmalloc(sizeof(*hm), GFP_KERNEL); in asihpi_hpi_ioctl()
117 if (!hm || !hr) { in asihpi_hpi_ioctl()
132 if (get_user(hm->h.size, (u16 __user *)puhm)) { in asihpi_hpi_ioctl()
136 if (hm->h.size > sizeof(*hm)) in asihpi_hpi_ioctl()
137 hm->h.size = sizeof(*hm); in asihpi_hpi_ioctl()
141 uncopied_bytes = copy_from_user(hm, puhm, hm->h.size); in asihpi_hpi_ioctl()
159 if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) { in asihpi_hpi_ioctl()
164 pa = &adapters[hm->h.adapter_index]; in asihpi_hpi_ioctl()
166 if (hm->h.object == HPI_OBJ_SUBSYSTEM) { in asihpi_hpi_ioctl()
167 switch (hm->h.function) { in asihpi_hpi_ioctl()
173 hr->h.function = hm->h.function; in asihpi_hpi_ioctl()
182 hpi_send_recv_f(&hm->m0, &hr->r0, file); in asihpi_hpi_ioctl()
190 u32 adapter = hm->h.adapter_index; in asihpi_hpi_ioctl()
192 if ((hm->h.adapter_index > HPI_MAX_ADAPTERS) || (!pa->type)) { in asihpi_hpi_ioctl()
212 switch (hm->h.function) { in asihpi_hpi_ioctl()
216 ptr = (u16 __user *)hm->m0.u.d.u.data.pb_data; in asihpi_hpi_ioctl()
217 size = hm->m0.u.d.u.data.data_size; in asihpi_hpi_ioctl()
227 hm->h.adapter_index, in asihpi_hpi_ioctl()
249 hm->m0.u.d.u.data.pb_data = pa->p_buffer; in asihpi_hpi_ioctl()
250 if (hm->h.function == HPI_ISTREAM_READ) in asihpi_hpi_ioctl()
273 hpi_send_recv_f(&hm->m0, &hr->r0, file); in asihpi_hpi_ioctl()
312 kfree(hm); in asihpi_hpi_ioctl()
322 struct hpi_message hm; in asihpi_adapter_probe() local
342 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_adapter_probe()
347 hm.adapter_index = HPI_ADAPTER_INDEX_INVALID; in asihpi_adapter_probe()
377 hm.u.s.resource.bus_type = HPI_BUS_PCI; in asihpi_adapter_probe()
378 hm.u.s.resource.r.pci = &pci; in asihpi_adapter_probe()
381 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_adapter_probe()
398 hm.adapter_index = adapter.index; in asihpi_adapter_probe()
438 struct hpi_message hm; in asihpi_adapter_remove() local
443 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_adapter_remove()
445 hm.obj_index = pa->index; in asihpi_adapter_remove()
446 hm.adapter_index = HPI_ADAPTER_INDEX_INVALID; in asihpi_adapter_remove()
447 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_adapter_remove()
473 struct hpi_message hm; in asihpi_init() local
480 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_init()
482 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_init()
487 struct hpi_message hm; in asihpi_exit() local
490 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_exit()
492 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_exit()