diff options
| author | Takashi Iwai <[email protected]> | 2025-09-17 13:09:01 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2025-09-17 13:10:58 +0000 |
| commit | 44499ecb4f2817743c37d861bdb3e95f37d3d9cd (patch) | |
| tree | e49fd7bccd8043858626a9e925e4e94f234d86c5 /lib/memory-notifier-error-inject.c | |
| parent | ALSA: hda/realtek: Fix volume control on Lenovo Thinkbook 13x Gen 4 (diff) | |
| download | kernel-44499ecb4f2817743c37d861bdb3e95f37d3d9cd.tar.gz kernel-44499ecb4f2817743c37d861bdb3e95f37d3d9cd.zip | |
ALSA: usb: qcom: Fix false-positive address space check
The sanity check previously added to uaudio_transfer_buffer_setup()
assumed the allocated buffer being linear-mapped. But the buffer
allocated via usb_alloc_coherent() isn't always so, rather to be used
with (SG-)DMA API. This leaded to a false-positive warning and the
driver failed to work.
Actually uaudio_transfer_buffer_setup() deals only with the DMA-API
addresses for MEM_XFER_BUF type, while other callers of
uaudio_iommu_map() are with pages with physical addresses for
MEM_EVENT_RING and MEM_XFER_RING types. So this patch splits the
mapping helper function to two different ones, uaudio_iommu_map() for
the DMA pages and uaudio_iommu_map_pa() for the latter, in order to
handle mapping differently for each type. Along with it, the
unnecessary address check that caused probe error is dropped, too.
Fixes: 3335a1bbd624 ("ALSA: qc_audio_offload: try to reduce address space confusion")
Suggested-by: Arnd Bergmann <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Reported-and-tested-by: Luca Weiss <[email protected]>
Closes: https://lore.kernel.org/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions
