Lines Matching refs:h
142 hm->h.size = msg_size; in asihpi_hpi_ioctl()
157 switch (hm->h.function) { in asihpi_hpi_ioctl()
161 hr->h.size = sizeof(hr->h); in asihpi_hpi_ioctl()
162 hr->h.error = HPI_ERROR_INVALID_OPERATION; in asihpi_hpi_ioctl()
163 hr->h.function = hm->h.function; in asihpi_hpi_ioctl()
164 uncopied_bytes = copy_to_user(puhr, hr, hr->h.size); in asihpi_hpi_ioctl()
172 hr->h.size = res_max_size; in asihpi_hpi_ioctl()
173 if (hm->h.object == HPI_OBJ_SUBSYSTEM) { in asihpi_hpi_ioctl()
182 if (hm->h.adapter_index < ARRAY_SIZE(adapters)) in asihpi_hpi_ioctl()
183 pa = &adapters[array_index_nospec(hm->h.adapter_index, in asihpi_hpi_ioctl()
187 hpi_init_response(&hr->r0, hm->h.object, in asihpi_hpi_ioctl()
188 hm->h.function, HPI_ERROR_BAD_ADAPTER_NUMBER); in asihpi_hpi_ioctl()
191 copy_to_user(puhr, hr, sizeof(hr->h)); in asihpi_hpi_ioctl()
205 switch (hm->h.function) { in asihpi_hpi_ioctl()
220 hm->h.adapter_index, in asihpi_hpi_ioctl()
242 if (hm->h.function == HPI_ISTREAM_READ) in asihpi_hpi_ioctl()
282 if (!hr->h.size) { in asihpi_hpi_ioctl()
288 if (hr->h.size > res_max_size) { in asihpi_hpi_ioctl()
289 HPI_DEBUG_LOG(ERROR, "response too big %d %d\n", hr->h.size, in asihpi_hpi_ioctl()
291 hr->h.error = HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL; in asihpi_hpi_ioctl()
292 hr->h.specific_error = hr->h.size; in asihpi_hpi_ioctl()
293 hr->h.size = sizeof(hr->h); in asihpi_hpi_ioctl()
296 uncopied_bytes = copy_to_user(puhr, hr, hr->h.size); in asihpi_hpi_ioctl()