linux/drivers/accel/qaic
Youssef Samir 2feec5ae5d accel/qaic: Handle DBC deactivation if the owner went away
When a DBC is released, the device sends a QAIC_TRANS_DEACTIVATE_FROM_DEV
transaction to the host over the QAIC_CONTROL MHI channel. QAIC handles
this by calling decode_deactivate() to release the resources allocated for
that DBC. Since that handling is done in the qaic_manage_ioctl() context,
if the user goes away before receiving and handling the deactivation, the
host will be out-of-sync with the DBCs available for use, and the DBC
resources will not be freed unless the device is removed. If another user
loads and requests to activate a network, then the device assigns the same
DBC to that network, QAIC will "indefinitely" wait for dbc->in_use = false,
leading the user process to hang.

As a solution to this, handle QAIC_TRANS_DEACTIVATE_FROM_DEV transactions
that are received after the user has gone away.

Fixes: 129776ac2e ("accel/qaic: Add control path")
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patch.msgid.link/20260205123415.3870898-1-youssef.abdulrahman@oss.qualcomm.com
History 2026-03-27 10:48:30 -06:00
..
Kconfig accel/qaic: Collect crashdump from SSR channel 2025-11-07 11:16:51 -07:00
Makefile accel/qaic: Implement basic SSR handling 2025-11-07 11:01:18 -07:00
mhi_controller.c net: qrtr: Drop the MHI auto_queue feature for IPCR DL channels 2025-12-31 16:24:04 +05:30
mhi_controller.h accel/qaic: Add AIC200 support 2025-01-31 10:08:45 -07:00
qaic.h accel/qaic: Add qaic_ prefix to irq_polling_work 2025-11-07 11:27:46 -07:00
qaic_control.c accel/qaic: Handle DBC deactivation if the owner went away 2026-03-27 10:48:30 -06:00
qaic_data.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qaic_debugfs.c accel/qaic: Fix bootlog initialization ordering 2025-10-14 08:30:39 -06:00
qaic_debugfs.h accel/qaic: mark debugfs stub functions as static inline 2024-04-12 09:53:28 -06:00
qaic_drv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qaic_ras.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qaic_ras.h accel/qaic: Add Reliability, Accessibility, Serviceability (RAS) 2025-05-30 09:14:35 -06:00
qaic_ssr.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
qaic_ssr.h accel/qaic: Collect crashdump from SSR channel 2025-11-07 11:16:51 -07:00
qaic_sysfs.c accel/qaic: Add DMA Bridge Channel(DBC) sysfs and uevents 2025-11-07 10:55:39 -07:00
qaic_timesync.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qaic_timesync.h accel/qaic: Add support for PM callbacks 2025-11-05 15:41:43 -07:00
sahara.c accel/qaic: Update the sahara image table for AIC200 2025-10-27 11:52:09 -06:00
sahara.h accel/qaic: Add Sahara implementation for firmware loading 2024-04-12 09:49:31 -06:00