From: "Michał Pecio" <michal.pecio@gmail.com>
To: Wesley Cheng <quic_wcheng@quicinc.com>
Cc: <mathias.nyman@linux.intel.com>, <Thinh.Nguyen@synopsys.com>,
<alsa-devel@alsa-project.org>, <bgoswami@quicinc.com>,
<broonie@kernel.org>, <conor+dt@kernel.org>, <corbet@lwn.net>,
<devicetree@vger.kernel.org>, <dmitry.torokhov@gmail.com>,
<gregkh@linuxfoundation.org>, <krzk+dt@kernel.org>,
<lgirdwood@gmail.com>, <linux-arm-msm@vger.kernel.org>,
<linux-doc@vger.kernel.org>, <linux-input@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-sound@vger.kernel.org>,
<linux-usb@vger.kernel.org>, <mathias.nyman@intel.com>,
<perex@perex.cz>, <pierre-louis.bossart@linux.intel.com>,
<robh@kernel.org>, <srinivas.kandagatla@linaro.org>,
<tiwai@suse.com>
Subject: Re: [PATCH v27 01/32] xhci: add helper to stop endpoint and wait for completion
Date: Sun, 15 Sep 2024 09:55:14 +0200 [thread overview]
Message-ID: <20240915095514.6b01fefb@foxbook> (raw)
In-Reply-To: <a9dcaa5a-4f5d-451a-93aa-7457798fc243@quicinc.com>
Hi,
> Maybe the last sentence is not needed. When we are using the
> secondary interrupters, at least in the offload use case that I've
> verified with, the XHCI is completely unaware of what TDs have been
> queued, etc... So technically, even if we did call the default
> handler (ie xhci_handle_cmd_stop_ep), most of the routines to
> invalidate TDs are going to be no-ops.
Yes, the cancellation machinery will return immediately if there are
no TDs queued by xhci_hcd itself.
But xhci_handle_cmd_stop_ep() does a few more things for you - it
checks if the command has actually succeeded, clears any halt condition
which may be preventing stopping the endpoint, and it sometimes retries
the command (only on "bad" chips, AFAIK).
This new code does none of the above, so in the general case it can't
even guarantee that the endpoint is stopped when it returns zero. This
should ideally be documented in some way, or fixed, before somebody is
tempted to call it with unrealistically high expectations ;)
As far as I see, it only works for you because isochronous never halts
and Qualcomm HW is (hopefully) free of those stop-after-restart bugs.
There will be problems if the SB tries to use any other endpoint type.
Regards,
Michal
next prev parent reply other threads:[~2024-09-15 7:55 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 19:39 [PATCH v27 00/32] Introduce QC USB SND audio offloading support Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 01/32] xhci: add helper to stop endpoint and wait for completion Wesley Cheng
2024-09-13 8:32 ` Michał Pecio
2024-09-13 22:14 ` Wesley Cheng
2024-09-15 7:55 ` Michał Pecio [this message]
2024-09-20 23:49 ` Wesley Cheng
2024-09-22 23:23 ` Michał Pecio
2024-09-24 21:47 ` Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 02/32] usb: host: xhci: Repurpose event handler for skipping interrupter events Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 03/32] xhci: sideband: add initial api to register a sideband entity Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 04/32] usb: xhci: xhci-sideband: Set IMOD for xHCI sideband clients Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 05/32] usb: host: xhci-mem: Cleanup pending secondary event ring events Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 06/32] usb: host: xhci-mem: Allow for interrupter clients to choose specific index Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 07/32] usb: host: xhci-plat: Set XHCI max interrupters if property is present Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 08/32] usb: dwc3: Specify maximum number of XHCI interrupters Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 09/32] ALSA: Add USB audio device jack type Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 10/32] ALSA: usb-audio: Export USB SND APIs for modules Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 11/32] ALSA: usb-audio: Check for support for requested audio format Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 12/32] ALSA: usb-audio: Save UAC sample size information Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 13/32] ALSA: usb-audio: Prevent starting of audio stream if in use Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 14/32] ASoC: Add SOC USB APIs for adding an USB backend Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 15/32] ASoC: usb: Add PCM format check API for " Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 16/32] ASoC: usb: Create SOC USB SND jack kcontrol Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 17/32] ASoC: usb: Fetch ASoC card and pcm device information Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 18/32] ASoC: doc: Add documentation for SOC USB Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 19/32] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add USB_RX port Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 20/32] ASoC: dt-bindings: Update example for enabling USB offload on SM8250 Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 21/32] ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 22/32] ASoC: qcom: qdsp6: q6afe: Increase APR timeout Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 23/32] ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6 Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 24/32] ASoC: qcom: qdsp6: Add headphone jack for offload connection status Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 25/32] ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 26/32] ALSA: usb-audio: Introduce USB SND platform op callbacks Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 27/32] ALSA: usb-audio: qcom: Add USB QMI definitions Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 28/32] ALSA: usb-audio: qcom: Introduce QC USB SND offloading support Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 29/32] ALSA: usb-audio: qcom: Don't allow USB offload path if PCM device is in use Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 30/32] ALSA: usb-audio: Add USB offload route kcontrol Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 31/32] ALSA: usb-audio: Allow for rediscovery of connected USB SND devices Wesley Cheng
2024-09-12 19:39 ` [PATCH v27 32/32] ASoC: usb: Rediscover USB SND devices on USB port add Wesley Cheng
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=20240915095514.6b01fefb@foxbook \
--to=michal.pecio@gmail.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mathias.nyman@linux.intel.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=quic_wcheng@quicinc.com \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).