mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
The management channel used for firmware control command submission is
currently created after the firmware is started. If channel creation
fails (for example, due to memory allocation failure or workqueue
creation interruption), the firmware remains in a pending state and is
unable to receive any control commands.
To avoid leaving the firmware in this inconsistent state, split
xdna_mailbox_create_channel() into two separate functions so that
resource allocation can be completed before interacting with the
hardware.
xdna_mailbox_alloc_channel()
Allocates memory and initializes the workqueue. This can be called
earlier, before interacting with the hardware.
xdna_mailbox_start_channel()
Performs the hardware interaction required to start the channel.
Rename xdna_mailbox_destroy_channel() to xdna_mailbox_free_channel().
Ensure that xdna_mailbox_stop_channel() and xdna_mailbox_free_channel()
properly unwind the corresponding start and allocation steps, respectively.
Fixes:
|
||
|---|---|---|
| .. | ||
| aie2_ctx.c | ||
| aie2_error.c | ||
| aie2_message.c | ||
| aie2_msg_priv.h | ||
| aie2_pci.c | ||
| aie2_pci.h | ||
| aie2_pm.c | ||
| aie2_psp.c | ||
| aie2_smu.c | ||
| aie2_solver.c | ||
| aie2_solver.h | ||
| amdxdna_ctx.c | ||
| amdxdna_ctx.h | ||
| amdxdna_error.h | ||
| amdxdna_gem.c | ||
| amdxdna_gem.h | ||
| amdxdna_mailbox.c | ||
| amdxdna_mailbox.h | ||
| amdxdna_mailbox_helper.c | ||
| amdxdna_mailbox_helper.h | ||
| amdxdna_pci_drv.c | ||
| amdxdna_pci_drv.h | ||
| amdxdna_pm.c | ||
| amdxdna_pm.h | ||
| amdxdna_sysfs.c | ||
| amdxdna_ubuf.c | ||
| amdxdna_ubuf.h | ||
| Kconfig | ||
| Makefile | ||
| npu1_regs.c | ||
| npu4_regs.c | ||
| npu5_regs.c | ||
| npu6_regs.c | ||
| TODO | ||