From: "Michał Pecio" <michal.pecio@gmail.com>
To: quic_wcheng@quicinc.com
Cc: Thinh.Nguyen@synopsys.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 v32 01/32] usb: host: xhci: Repurpose event handler for skipping interrupter events
Date: Mon, 13 Jan 2025 14:36:32 +0100 [thread overview]
Message-ID: <20250113143632.63c52d74@foxbook> (raw)
In-Reply-To: <20250108012213.1659364-2-quic_wcheng@quicinc.com>
Hi,
> Depending on the interrupter use case, the OS may only be used to
> handle the interrupter event ring clean up.
What do you mean by "cleanup"? Because I see that this patch ends up
acknowledging events to the xHC and I don't know why it would do so?
> In these scenarios, event TRBs don't need to be handled by the OS,
> so introduce an xhci interrupter flag to tag if the events from an
> interrupter needs to be handled or not.
Right, and if the OS isn't handling those events because they are owned
by a coprocessor then it shouldn't be acknowledging them either, which
has the effect that the xHC considers their memory free for reuse.
Also, what happens when Linux goes to sleep and this IRQ stops running?
I expected that the coprocessor itself should be updating the xHC about
its own progress.
Is it a bug? How is this stuff supposed to work?
How are future developers supposed to know how it is supposed to work?
I imagine that few of them will have Qualcomm hardware for testing.
> static int xhci_handle_event_trb(struct xhci_hcd *xhci, struct xhci_interrupter *ir,
> union xhci_trb *event)
> {
> u32 trb_type;
>
> + /*
> + * Some interrupters do not need to handle event TRBs, as they may be
> + * managed by another entity, but rely on the OS to clean up.
> + */
> + if (ir->skip_events)
> + return 0;
This function is only called from one place so the caller could perform
this check and don't waste time calling it.
Regards,
Michalal
next prev parent reply other threads:[~2025-01-13 13:36 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 1:21 [PATCH v32 00/32] Introduce QC USB SND audio offloading support Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 01/32] usb: host: xhci: Repurpose event handler for skipping interrupter events Wesley Cheng
2025-01-13 13:36 ` Michał Pecio [this message]
2025-01-13 23:27 ` Wesley Cheng
2025-01-14 14:08 ` Michał Pecio
2025-01-14 20:42 ` Wesley Cheng
2025-01-16 15:15 ` Mathias Nyman
2025-01-16 22:50 ` Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 02/32] xhci: sideband: add initial api to register a secondary interrupter entity Wesley Cheng
2025-01-08 14:10 ` Mathias Nyman
2025-01-13 23:28 ` Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 03/32] usb: host: xhci-mem: Cleanup pending secondary event ring events Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 04/32] usb: host: xhci-mem: Allow for interrupter clients to choose specific index Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 05/32] usb: host: xhci-plat: Set XHCI max interrupters if property is present Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 06/32] usb: host: xhci: Notify xHCI sideband on transfer ring free Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 07/32] usb: dwc3: Specify maximum number of XHCI interrupters Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 08/32] ALSA: Add USB audio device jack type Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 09/32] ALSA: usb-audio: Export USB SND APIs for modules Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 10/32] ALSA: usb-audio: Check for support for requested audio format Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 11/32] ALSA: usb-audio: Save UAC sample size information Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 12/32] ALSA: usb-audio: Prevent starting of audio stream if in use Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 13/32] ALSA: usb-audio: Introduce USB SND platform op callbacks Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 14/32] ALSA: usb-audio: Allow for rediscovery of connected USB SND devices Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 15/32] ASoC: Add SoC USB APIs for adding an USB backend Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 16/32] ASoC: usb: Add PCM format check API for " Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 17/32] ASoC: usb: Create SOC USB SND jack kcontrol Wesley Cheng
2025-01-08 1:21 ` [PATCH v32 18/32] ASoC: usb: Fetch ASoC card and pcm device information Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 19/32] ASoC: usb: Rediscover USB SND devices on USB port add Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 20/32] ASoC: doc: Add documentation for SOC USB Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 21/32] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add USB_RX port Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 22/32] ASoC: dt-bindings: Update example for enabling USB offload on SM8250 Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 23/32] ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 24/32] ASoC: qcom: qdsp6: q6afe: Increase APR timeout Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 25/32] ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6 Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 26/32] ASoC: qcom: qdsp6: Add headphone jack for offload connection status Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 27/32] ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 28/32] ALSA: usb-audio: qcom: Add USB QMI definitions Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 29/32] ALSA: usb-audio: qcom: Introduce QC USB SND offloading support Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 30/32] ALSA: usb-audio: qcom: Don't allow USB offload path if PCM device is in use Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 31/32] ALSA: usb-audio: qcom: Add USB offload route kcontrol Wesley Cheng
2025-01-08 1:22 ` [PATCH v32 32/32] ALSA: usb-audio: qcom: Notify USB audio devices on USB offload probing 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=20250113143632.63c52d74@foxbook \
--to=michal.pecio@gmail.com \
--cc=Thinh.Nguyen@synopsys.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=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).