Lines Matching refs:hm
82 struct hpi_message hm;
87 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM,
89 hpi_send_recv_ex(&hm, &hr, file);
98 union hpi_message_buffer_v1 *hm;
108 hm = kmalloc(sizeof(*hm), GFP_KERNEL);
110 if (!hm || !hr) {
129 if (msg_size > sizeof(*hm))
130 msg_size = sizeof(*hm);
132 /* printk(KERN_INFO "message size %d\n", hm->h.wSize); */
134 uncopied_bytes = copy_from_user(hm, puhm, msg_size);
142 hm->h.size = msg_size;
157 switch (hm->h.function) {
163 hr->h.function = hm->h.function;
173 if (hm->h.object == HPI_OBJ_SUBSYSTEM) {
174 hpi_send_recv_f(&hm->m0, &hr->r0, file);
182 if (hm->h.adapter_index < ARRAY_SIZE(adapters))
183 pa = &adapters[array_index_nospec(hm->h.adapter_index,
187 hpi_init_response(&hr->r0, hm->h.object,
188 hm->h.function, HPI_ERROR_BAD_ADAPTER_NUMBER);
205 switch (hm->h.function) {
209 ptr = (u16 __user *)hm->m0.u.d.u.data.pb_data;
210 size = hm->m0.u.d.u.data.data_size;
220 hm->h.adapter_index,
241 hm->m0.u.d.u.data.pb_data = pa->p_buffer;
242 if (hm->h.function == HPI_ISTREAM_READ)
265 hpi_send_recv_f(&hm->m0, &hr->r0, file);
304 kfree(hm);
352 struct hpi_message hm;
372 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM,
377 hm.adapter_index = HPI_ADAPTER_INDEX_INVALID;
400 hm.u.s.resource.bus_type = HPI_BUS_PCI;
401 hm.u.s.resource.r.pci = &pci;
404 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
422 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
424 hm.adapter_index = adapter.adapter->index;
425 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
433 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
435 hm.adapter_index = adapter.adapter->index;
436 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
447 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
449 hm.adapter_index = adapter.adapter->index;
450 hm.u.ax.property_set.property = HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ;
451 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
476 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
478 hm.adapter_index = adapter.adapter->index;
479 hm.u.ax.property_set.property = HPI_ADAPTER_PROPERTY_IRQ_RATE;
480 hm.u.ax.property_set.parameter1 = 0;
481 hm.u.ax.property_set.parameter2 = 0;
482 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
531 struct hpi_message hm;
540 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
542 hm.adapter_index = pa->adapter->index;
543 hm.u.ax.property_set.property = HPI_ADAPTER_PROPERTY_IRQ_RATE;
544 hm.u.ax.property_set.parameter1 = 0;
545 hm.u.ax.property_set.parameter2 = 0;
546 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
548 hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
550 hm.adapter_index = pa->adapter->index;
551 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
574 struct hpi_message hm;
581 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM,
583 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
588 struct hpi_message hm;
591 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM,
593 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);