All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wesley Cheng" <wesley.cheng@oss.qualcomm.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v6 3/4] ALSA: usb-audio: qcom: tag sideband endpoints before ring allocation
Date: Tue, 10 Nov 2026 02:55:42 +0000	[thread overview]
Message-ID: <sashiko-outbox-206070@kernel.org> (raw)
In-Reply-To: <20261109-16k_offload_v1_b4-v6-3-858c6e0e007d@oss.qualcomm.com>

> On kernels with a PAGE_SIZE larger than TRB_SEGMENT_SIZE,
> xhci_endpoint_init() allocates the ring segments of endpoints that have
> already been tagged via xhci_sideband_add_endpoint() with
> dma_alloc_coherent() instead of from the shared xhci->segment_pool, so
> the buffer reported to the ADSP over QMI is guaranteed to come from a
> page of its own.
> 
> xhci_sideband_add_endpoint() must therefore run before the endpoint's
> transfer ring is first allocated (i.e. before snd_usb_endpoint_prepare()
> triggers xhci_endpoint_init()) for that allocation to apply. Move the
> xhci_sideband_add_endpoint() calls out of uaudio_endpoint_setup() and
> into enable_audio_stream(), before snd_usb_endpoint_prepare() is called
> for the data and sync endpoints, and unwind them on the new error paths.
> 
> Now that its only caller tags the endpoint before the ring exists, have
> xhci_sideband_add_endpoint() return -EBUSY if the endpoint already has a
> transfer ring, so a sideband client that adds the endpoint too late gets
> an error instead of a ring that silently came from the shared pool.
> 
> At that point in the setup sequence dev->ep_in[]/ep_out[] are not yet
> populated, since the endpoint's altsetting has not been activated, so
> usb_pipe_endpoint() cannot be used to find the usb_host_endpoint. Add
> uaudio_find_host_endpoint(), which resolves it directly from the
> interface's altsetting descriptor table instead.
> 
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Wesley Cheng <wesley.cheng@oss.qualcomm.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109-16k_offload_v1_b4-v6-0-858c6e0e007d@oss.qualcomm.com?part=3


  reply	other threads:[~2026-11-10  2:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  2:38 [PATCH v6 0/4] Add larger page size support for USB audio offload path Wesley Cheng
2026-11-10  2:38 ` [PATCH v6 1/4] usb: xhci: sideband: fix ring sg table for sub-page TRB segments Wesley Cheng
2026-11-10  2:47   ` sashiko-bot
2026-11-10  2:38 ` [PATCH v6 2/4] usb: xhci: Allocate sideband ring segments with dma_alloc_coherent() Wesley Cheng
2026-11-10  2:55   ` sashiko-bot
2026-11-10  2:38 ` [PATCH v6 3/4] ALSA: usb-audio: qcom: tag sideband endpoints before ring allocation Wesley Cheng
2026-11-10  2:55   ` sashiko-bot [this message]
2026-11-10  2:38 ` [PATCH v6 4/4] ALSA: usb-audio: qcom: fix xfer ring IOMMU unmap on 16K+ page kernels Wesley Cheng
2026-11-10  3:02   ` sashiko-bot

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=sashiko-outbox-206070@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wesley.cheng@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.