• Home
  • Raw
  • Download

Lines Matching refs:tx_msg

212 static void ipmi_msg_release(struct acpi_ipmi_msg *tx_msg)  in ipmi_msg_release()  argument
214 acpi_ipmi_dev_put(tx_msg->device); in ipmi_msg_release()
215 kfree(tx_msg); in ipmi_msg_release()
220 struct acpi_ipmi_msg *tx_msg = in ipmi_msg_release_kref() local
223 ipmi_msg_release(tx_msg); in ipmi_msg_release_kref()
226 static struct acpi_ipmi_msg *acpi_ipmi_msg_get(struct acpi_ipmi_msg *tx_msg) in acpi_ipmi_msg_get() argument
228 kref_get(&tx_msg->kref); in acpi_ipmi_msg_get()
230 return tx_msg; in acpi_ipmi_msg_get()
233 static void acpi_ipmi_msg_put(struct acpi_ipmi_msg *tx_msg) in acpi_ipmi_msg_put() argument
235 kref_put(&tx_msg->kref, ipmi_msg_release_kref); in acpi_ipmi_msg_put()
240 static int acpi_format_ipmi_request(struct acpi_ipmi_msg *tx_msg, in acpi_format_ipmi_request() argument
249 msg = &tx_msg->tx_message; in acpi_format_ipmi_request()
257 msg->data = tx_msg->data; in acpi_format_ipmi_request()
267 dev_WARN_ONCE(tx_msg->device->dev, true, in acpi_format_ipmi_request()
273 memcpy(tx_msg->data, buffer->data, msg->data_len); in acpi_format_ipmi_request()
282 tx_msg->addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE; in acpi_format_ipmi_request()
283 tx_msg->addr.channel = IPMI_BMC_CHANNEL; in acpi_format_ipmi_request()
284 tx_msg->addr.data[0] = 0; in acpi_format_ipmi_request()
287 device = tx_msg->device; in acpi_format_ipmi_request()
291 tx_msg->tx_msgid = device->curr_msgid; in acpi_format_ipmi_request()
326 struct acpi_ipmi_msg *tx_msg; in ipmi_flush_tx_msg() local
339 tx_msg = list_first_entry(&ipmi->tx_msg_list, in ipmi_flush_tx_msg()
342 list_del(&tx_msg->head); in ipmi_flush_tx_msg()
346 complete(&tx_msg->tx_complete); in ipmi_flush_tx_msg()
347 acpi_ipmi_msg_put(tx_msg); in ipmi_flush_tx_msg()
356 struct acpi_ipmi_msg *tx_msg, *temp; in ipmi_cancel_tx_msg() local
361 list_for_each_entry_safe(tx_msg, temp, &ipmi->tx_msg_list, head) { in ipmi_cancel_tx_msg()
362 if (msg == tx_msg) { in ipmi_cancel_tx_msg()
364 list_del(&tx_msg->head); in ipmi_cancel_tx_msg()
371 acpi_ipmi_msg_put(tx_msg); in ipmi_cancel_tx_msg()
378 struct acpi_ipmi_msg *tx_msg, *temp; in ipmi_msg_handler() local
390 list_for_each_entry_safe(tx_msg, temp, &ipmi_device->tx_msg_list, head) { in ipmi_msg_handler()
391 if (msg->msgid == tx_msg->tx_msgid) { in ipmi_msg_handler()
393 list_del(&tx_msg->head); in ipmi_msg_handler()
420 tx_msg->msg_done = ACPI_IPMI_TIMEOUT; in ipmi_msg_handler()
425 tx_msg->rx_len = msg->msg.data_len; in ipmi_msg_handler()
426 memcpy(tx_msg->data, msg->msg.data, tx_msg->rx_len); in ipmi_msg_handler()
427 tx_msg->msg_done = ACPI_IPMI_OK; in ipmi_msg_handler()
430 complete(&tx_msg->tx_complete); in ipmi_msg_handler()
431 acpi_ipmi_msg_put(tx_msg); in ipmi_msg_handler()
526 struct acpi_ipmi_msg *tx_msg; in acpi_ipmi_space_handler() local
541 tx_msg = ipmi_msg_alloc(); in acpi_ipmi_space_handler()
542 if (!tx_msg) in acpi_ipmi_space_handler()
544 ipmi_device = tx_msg->device; in acpi_ipmi_space_handler()
546 if (acpi_format_ipmi_request(tx_msg, address, value) != 0) { in acpi_ipmi_space_handler()
547 ipmi_msg_release(tx_msg); in acpi_ipmi_space_handler()
551 acpi_ipmi_msg_get(tx_msg); in acpi_ipmi_space_handler()
556 ipmi_msg_release(tx_msg); in acpi_ipmi_space_handler()
560 list_add_tail(&tx_msg->head, &ipmi_device->tx_msg_list); in acpi_ipmi_space_handler()
565 &tx_msg->addr, in acpi_ipmi_space_handler()
566 tx_msg->tx_msgid, in acpi_ipmi_space_handler()
567 &tx_msg->tx_message, in acpi_ipmi_space_handler()
573 wait_for_completion(&tx_msg->tx_complete); in acpi_ipmi_space_handler()
575 acpi_format_ipmi_response(tx_msg, value); in acpi_ipmi_space_handler()
579 ipmi_cancel_tx_msg(ipmi_device, tx_msg); in acpi_ipmi_space_handler()
580 acpi_ipmi_msg_put(tx_msg); in acpi_ipmi_space_handler()