Lines Matching refs:hm

90 	struct hpi_message hm;  in asihpi_hpi_release()  local
95 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_hpi_release()
97 hpi_send_recv_ex(&hm, &hr, file); in asihpi_hpi_release()
106 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 switch (hm->h.function) { in asihpi_hpi_ioctl()
165 hr->h.function = hm->h.function; in asihpi_hpi_ioctl()
175 if (hm->h.object == HPI_OBJ_SUBSYSTEM) { in asihpi_hpi_ioctl()
176 hpi_send_recv_f(&hm->m0, &hr->r0, file); in asihpi_hpi_ioctl()
184 if (hm->h.adapter_index < ARRAY_SIZE(adapters)) in asihpi_hpi_ioctl()
185 pa = &adapters[hm->h.adapter_index]; in asihpi_hpi_ioctl()
188 hpi_init_response(&hr->r0, hm->h.object, in asihpi_hpi_ioctl()
189 hm->h.function, HPI_ERROR_BAD_ADAPTER_NUMBER); in asihpi_hpi_ioctl()
206 switch (hm->h.function) { in asihpi_hpi_ioctl()
210 ptr = (u16 __user *)hm->m0.u.d.u.data.pb_data; in asihpi_hpi_ioctl()
211 size = hm->m0.u.d.u.data.data_size; in asihpi_hpi_ioctl()
221 hm->h.adapter_index, in asihpi_hpi_ioctl()
242 hm->m0.u.d.u.data.pb_data = pa->p_buffer; in asihpi_hpi_ioctl()
243 if (hm->h.function == HPI_ISTREAM_READ) in asihpi_hpi_ioctl()
266 hpi_send_recv_f(&hm->m0, &hr->r0, file); in asihpi_hpi_ioctl()
305 kfree(hm); in asihpi_hpi_ioctl()
316 struct hpi_message hm; in asihpi_adapter_probe() local
336 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_adapter_probe()
341 hm.adapter_index = HPI_ADAPTER_INDEX_INVALID; in asihpi_adapter_probe()
364 hm.u.s.resource.bus_type = HPI_BUS_PCI; in asihpi_adapter_probe()
365 hm.u.s.resource.r.pci = &pci; in asihpi_adapter_probe()
368 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_adapter_probe()
386 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, in asihpi_adapter_probe()
388 hm.adapter_index = adapter.adapter->index; in asihpi_adapter_probe()
389 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_adapter_probe()
427 struct hpi_message hm; in asihpi_adapter_remove() local
435 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, in asihpi_adapter_remove()
437 hm.adapter_index = pa->adapter->index; in asihpi_adapter_remove()
438 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_adapter_remove()
462 struct hpi_message hm; in asihpi_init() local
469 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_init()
471 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_init()
476 struct hpi_message hm; in asihpi_exit() local
479 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, in asihpi_exit()
481 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); in asihpi_exit()