From: Takashi Iwai <tiwai@suse.de>
To: "Luca Weiss" <luca.weiss@fairphone.com>
Cc: "Takashi Iwai" <tiwai@suse.de>, <linux-sound@vger.kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>
Subject: Re: [PATCH] ALSA: usb: qcom: Fix false-positive address space check
Date: Wed, 17 Sep 2025 16:06:29 +0200 [thread overview]
Message-ID: <87h5x1cgwq.wl-tiwai@suse.de> (raw)
In-Reply-To: <DCV4O98LHJW2.1HVRG1E5C10DY@fairphone.com>
On Wed, 17 Sep 2025 15:59:55 +0200,
Luca Weiss wrote:
>
> Hi Takashi,
>
> On Wed Sep 17, 2025 at 3:09 PM CEST, Takashi Iwai wrote:
> > 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.
>
> Thanks for fixing this, and Arnd for the help!
>
> > Fixes: 3335a1bbd624 ("ALSA: qc_audio_offload: try to reduce address space confusion")
> > Suggested-by: Arnd Bergmann <arnd@arndb.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > Reported-and-tested-by: Luca Weiss <luca.weiss@fairphone.com>
>
> I don't know if https://www.kernel.org/doc/html/latest/process/maintainer-tip.html
> is applicable to also sound subsystem or the whole tree but maybe
> separate tags are simpler?
>
> Reported-by: Luca Weiss <luca.weiss@fairphone.com>
> Tested-by: Luca Weiss <luca.weiss@fairphone.com>
It's only for tip tree.
Reported-and-tested-by tag is commonly used.
Takashi
prev parent reply other threads:[~2025-09-17 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 13:09 [PATCH] ALSA: usb: qcom: Fix false-positive address space check Takashi Iwai
2025-09-17 13:59 ` Luca Weiss
2025-09-17 14:06 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h5x1cgwq.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox