Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1675727rwj; Sat, 24 Dec 2022 01:20:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXvLuVtqIzSjG0Ul93/dlBRmVKqikgGtFLWkaOqalHqvErsrqNZj85IR600a7UFxVSKhe3SY X-Received: by 2002:a17:902:ccd0:b0:189:6ab3:9e57 with SMTP id z16-20020a170902ccd000b001896ab39e57mr13803564ple.22.1671873633178; Sat, 24 Dec 2022 01:20:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671873633; cv=none; d=google.com; s=arc-20160816; b=BnP0qcGHTdMPNFnWMEtZ12aaZb03i1sMXmLv2yWzVfgjkEpiQElmkxCLRz/mEVUfqr FyHti0B4TcfWzJ7BzTXwWGEH5Ldq83X//EkpFIJSQzy7xpHUSHVkKGHG9dV7a/bNMvW1 SnFTbO/suikAm5bpImk1TKOkr53zJo7k1ibg6JK+YZtdDck14+qMToj/yjquMqs9QJph qJvGgb25Js81PibgY26YIt3DX8HC1OzmwG/bVQZGmtSTlC6yXpSuB1vTWBynm2uNKRSX eu1VHvTkobtI/Gt4BF3RsJ8pQs53Yeu8zsW9A6vVsq9l8jdwVH0d2DQCVx7PNrY2Ip+W 8PKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LjOzjAYddUteXRmhTz2iwaQopkAhz9WKa/QxnbzAHs8=; b=ak4JJBYgdYNbod2u8py+M5qOSzYoc2rEU9fN62x+bzRWh3WaOX+qskbIWr5b1vo6wT tGSBlZsmdJUHbcW0KvzbFBJro0Sv3xahkm4ldFte5YGsjX1LBeHLATjDqsDaFzwYxZ1y nImLIoroJd6dkzJfdiVTqx1njC0meEn4V3G+V+TjOA/bS5cSQN0KzIpyLWDsYfDWfkU0 ejnavtRIpVp1IXLiT8LX7NDoSjpqiCVUanuGXH6wjsLUua3bdYLTuYE4sc38K9pw56tD rtzZfb1kLrUKwcS80Bh99r8TsV/fsERn4jGaJJhHLr0TytRK0IhqbR74KReICnpJMncA zKig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZIGB8jc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik24-20020a170902ab1800b001925398170esi5521832plb.81.2022.12.24.01.20.20; Sat, 24 Dec 2022 01:20:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZIGB8jc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbiLXIzr (ORCPT + 65 others); Sat, 24 Dec 2022 03:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230449AbiLXIzX (ORCPT ); Sat, 24 Dec 2022 03:55:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAF50140CA; Sat, 24 Dec 2022 00:55:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 83A2CB82153; Sat, 24 Dec 2022 08:55:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8AA0C433EF; Sat, 24 Dec 2022 08:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1671872120; bh=viKmcZzp/wbu7S0+5GGw6FGqvwbKp//GP5BtC8Z10i4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZIGB8jc0yvSmiOk9c8oe4uC1zDW6silh0FxTmk15X8AA3AEpWqb57gAbmeKB4bsb8 GeALnFg45+4CrqaPmZiDvzF+sImgyOaApGiXGhqKDCmCwtJyVR+Eqlepi36rnuH2Op xnSqdAYzBZK0e6kUlG09ozOUFwzj0eWOjJyyfdgY= Date: Sat, 24 Dec 2022 09:55:17 +0100 From: Greg KH To: Wesley Cheng Cc: srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, broonie@kernel.org, lgirdwood@gmail.com, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, Thinh.Nguyen@synopsys.com, bgoswami@quicinc.com, tiwai@suse.com, robh+dt@kernel.org, agross@kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, quic_jackp@quicinc.com, quic_plai@quicinc.com Subject: Re: [RFC PATCH 07/14] usb: host: xhci: Add XHCI secondary interrupter support Message-ID: References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-8-quic_wcheng@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221223233200.26089-8-quic_wcheng@quicinc.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 :(