Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4791268rwl; Wed, 28 Dec 2022 08:52:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXuKh82m6NpaX7AQnAylT5/59JgAM6aPYuV/H6DoWIXUW493qupmBgCJjCjxO/y4qRMphgpP X-Received: by 2002:a17:902:bd01:b0:191:309a:826e with SMTP id p1-20020a170902bd0100b00191309a826emr28826595pls.15.1672246357476; Wed, 28 Dec 2022 08:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672246357; cv=none; d=google.com; s=arc-20160816; b=rRfQMIR1PcGFM8kS2DHBX7R+o+qumgNo3bYJbp2R88tdYrM9XuoSic/5Ht/tfnrUuw 7G1Yy9zqVaoXhGs9amAyUUIKdSZwkapobEY77cIW+4/WiCjEOAd7mwCVysRMo/M5ZpEv ngBoB9QWqJcw2caW82AY7iM4crCu4wgpe4gpQERY7QMI9mkPXEbjlz50LHti7BSg7sA5 2uYQiljPG2fwd2PfGqqmpphNXFMiZLBso8Xy5trQVRuByLiKaTVALwzEPT5MpOq2VDwm EPbsNeVoyqPzbRUvO6YGRdhUmuaenklRJNq2SUEMbw9BXt1XHKyQEG55SvGLFFhVd+6r h1mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:content-language:references:cc:to:user-agent:mime-version:date :message-id:dkim-signature; bh=r2F64Tu585E7jBfrDJMgihYcbJ0FYqzEjqr/xE1lbik=; b=i7Cw/tJyd+dl8jFdhT7cQdeHzoepkotXdzKs66XC+3WrkjCR2WLxfewAA43se1rmTv CUhUuMJMMqyLPW010eYuoABNu2u71fOSJI5LH/O/qv5I/GBsmSTCUBnkDr9Un99IHn7o hd5CEA/JBYNRMH9+Cqlt6r5VVsuzaWyZevhxaHPlGm15Pbk3MTmjBH0sjSr4tq6DXuOs zQQAf4vQLRVVirCHJjWpv9gH1xcMiNJ2yQv1IGiF44dh9i5HQ8Yg7xxP//k2jPXPPCh/ p8ytdVAh8jVwHbnHOtfCBrMq7OE3RJxgelsFMaJMHlc4rNCMQq30VNaYCdRq497KNHeg 2xkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UBGqbU5V; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a170902e0c900b00192659c74aesi12490401pla.362.2022.12.28.08.52.28; Wed, 28 Dec 2022 08:52:37 -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=@intel.com header.s=Intel header.b=UBGqbU5V; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234029AbiL1PqR (ORCPT + 64 others); Wed, 28 Dec 2022 10:46:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234015AbiL1PqP (ORCPT ); Wed, 28 Dec 2022 10:46:15 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8947614D27; Wed, 28 Dec 2022 07:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672242373; x=1703778373; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=SB1x38s3dv6Gdzi7eiwaN7LwRGEtLuEFsZIEzhZwdls=; b=UBGqbU5V0c0n6bGCc03FYH4wSOXmVytfP7hOBWhgEvMoeakXOeHgXye/ 1UVzWNvVQX4SjM/i7kVfGDDo60mc2NIN3/yb2y2U93Wd2flct+JbcPz7y In508AxydbVsy1R5WG7xulsQo0GythLWrg3omyiPmbcInouCAZRe8UFgg SOCj2FMdzP6medUMzDI/MQxthO9LM25JBt/4opvIYB0ciIzXA73Q5y+3A ABkj6j3WY/FLy58jn6m8NzzqulbNu63Us+AsOGEcyyRA0kKr5zbngx3QJ ZVEm2ebkJyzuz40afva9gx7DJZgtQr/CLVKXPGPpu4xcgchJKsi83MypU w==; X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="304388687" X-IronPort-AV: E=Sophos;i="5.96,281,1665471600"; d="scan'208";a="304388687" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 07:46:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="982118992" X-IronPort-AV: E=Sophos;i="5.96,281,1665471600"; d="scan'208";a="982118992" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.199]) ([10.237.72.199]) by fmsmga005.fm.intel.com with ESMTP; 28 Dec 2022 07:46:07 -0800 Message-ID: <7dfe215b-4cc7-f95f-17c3-563c0120151a@linux.intel.com> Date: Wed, 28 Dec 2022 17:47:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.2 To: Wesley Cheng , 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, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, bgoswami@quicinc.com, tiwai@suse.com, robh+dt@kernel.org, agross@kernel.org Cc: 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 References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-8-quic_wcheng@quicinc.com> Content-Language: en-US From: Mathias Nyman Subject: Re: [RFC PATCH 07/14] usb: host: xhci: Add XHCI secondary interrupter support In-Reply-To: <20221223233200.26089-8-quic_wcheng@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE 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 24.12.2022 1.31, 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. > Adding support for more xHCI interrupters than just the primary one make sense for both the offloading and virtualization cases. xHCI support for several interrupters was probably added to support virtualization, to hand over usb devices to virtual machines and give them their own event ring and MSI/MSI-X vector. In this offloading case you probably want to avoid xHC interrupts from this device completely, making sure it doesn't wake up the main CPU unnecessarily. So is the idea here to let xhci driver set up the new interrupter, its event ring, and the endpoint transfer rings. Then pass the address of the endpoint transfer rings and the new event ring to the separate processor. This separate processor then both polls the event ring for new events, sets its dequeue pointer, clears EHB bit, and queues new TRBs on the transfer ring. so xhci driver does not handle any events for the audio part, and no audio data URBs are sent to usb core? How about the control part? Is the control endpoint for this device still handled normally by usb core/xhci? For the xhci parts I think we should start start by adding generic support for several interrupters, then add parts needed for offloading. Thanks Mathias