[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6a+daSIEZaHhz6b@kroah.com>
Date: Sat, 24 Dec 2022 09:55:17 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Wesley Cheng <quic_wcheng@...cinc.com>
Cc: srinivas.kandagatla@...aro.org, mathias.nyman@...el.com,
perex@...ex.cz, broonie@...nel.org, lgirdwood@...il.com,
andersson@...nel.org, krzysztof.kozlowski+dt@...aro.org,
Thinh.Nguyen@...opsys.com, bgoswami@...cinc.com, tiwai@...e.com,
robh+dt@...nel.org, agross@...nel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-usb@...r.kernel.org, quic_jackp@...cinc.com,
quic_plai@...cinc.com
Subject: Re: [RFC PATCH 07/14] usb: host: xhci: Add XHCI secondary
interrupter support
On Fri, Dec 23, 2022 at 03:31:53PM -0800, Wesley Cheng wrote:
> Implement the XHCI operations for allocating and requesting for a secondary
> interrupter. The secondary interrupter can allow for events for a
> particular endpoint to be routed to a separate event ring. The event
> routing is defined when submitting a transfer descriptor to the USB HW.
> There is a specific field which denotes which interrupter ring to route the
> event to when the transfer is completed.
>
> An example use case, such as audio packet offloading can utilize a separate
> event ring, so that these events can be routed to a different processor
> within the system. The processor would be able to independently submit
> transfers and handle its completions without intervention from the main
> processor.
>
> Signed-off-by: Wesley Cheng <quic_wcheng@...cinc.com>
> ---
> drivers/usb/host/xhci-mem.c | 219 ++++++++++++++++++++++++++++-------
> drivers/usb/host/xhci-plat.c | 2 +
> drivers/usb/host/xhci.c | 169 ++++++++++++++++++++++++++-
> drivers/usb/host/xhci.h | 15 +++
> 4 files changed, 363 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
> index 81ca2bc1f0be..d5cb4b82ad3d 100644
> --- a/drivers/usb/host/xhci-mem.c
> +++ b/drivers/usb/host/xhci-mem.c
> @@ -1835,6 +1835,7 @@ void xhci_free_erst(struct xhci_hcd *xhci, struct xhci_erst *erst)
> void xhci_mem_cleanup(struct xhci_hcd *xhci)
> {
> struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
> + struct xhci_sec *sec, *tmp;
> int i, j, num_ports;
>
> cancel_delayed_work_sync(&xhci->cmd_timer);
> @@ -1846,6 +1847,16 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
> xhci->event_ring = NULL;
> xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed event ring");
>
> + list_for_each_entry_safe(sec, tmp, &xhci->xhci_sec_list, list) {
> + list_del(&sec->list);
> + if (sec->event_ring) {
> + xhci_ring_free(xhci, sec->event_ring);
> + xhci_dbg_trace(xhci, trace_xhci_dbg_init,
> + "Freed secondary ring %d", sec->intr_num);
Odd indentation :(
Powered by blists - more mailing lists