From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9046FC4167B for ; Wed, 28 Dec 2022 15:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233157AbiL1PQk (ORCPT ); Wed, 28 Dec 2022 10:16:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233136AbiL1PQj (ORCPT ); Wed, 28 Dec 2022 10:16:39 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id A71F0B46 for ; Wed, 28 Dec 2022 07:16:38 -0800 (PST) Received: (qmail 279415 invoked by uid 1000); 28 Dec 2022 10:16:37 -0500 Date: Wed, 28 Dec 2022 10:16:37 -0500 From: Alan Stern To: Oliver Neukum Cc: 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, 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 06/14] usb: core: hcd: Introduce USB HCD APIs for interrupter management Message-ID: References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-7-quic_wcheng@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Dec 28, 2022 at 09:59:03AM +0100, Oliver Neukum wrote: > > > On 27.12.22 22:07, Wesley Cheng wrote: > > > > > Hmmm...maybe I should change the name of the API then to avoid the confusion.  Yes, usb_hcd_flush_endpoint() does ensure that URBs submitted to the EP are stopped.  However, with this offloading concept, we aren't actually submitting URBs from the main processor, so the ep->urb_list will be empty. > > > > This means the usb_hcd_flush_endpoint() API won't actually do anything.  What we need is to ensure that we send a XHCI stop ep command to the controller. > > That is a concept specific to XHCI, yet you are adding a generic > API. The namin should reflect that. usb_quiesce_endpoint() ? Or even xhci_send_stop_ep_cmd(), which is what the routine is intended to do. Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F0E9C3DA7A for ; Wed, 28 Dec 2022 15:17:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 037CC83CE; Wed, 28 Dec 2022 16:16:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 037CC83CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672240654; bh=awp8kAcxNZmB8S4ethbaDktNSkEsCCFBE0EANkVyN+k=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=UO+gb02b+pcUr+463Y8eR8CMHY2IxSd5mvaVjVq0b25hHhN1mfm6WZZlEeoS5SddT yKExs1yzPlgjf0fcZx6uSMK+7OUw7qVwhAUTZ8VMrwFKmHmVG2O47jLpEzeCkuGSrU Fx3tGWvFkZojlXBvB4wlTCfqrjZLfKaGUWRoEBnI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 99DD3F80424; Wed, 28 Dec 2022 16:16:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D57E2F8042F; Wed, 28 Dec 2022 16:16:41 +0100 (CET) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by alsa1.perex.cz (Postfix) with SMTP id ADE11F800F0 for ; Wed, 28 Dec 2022 16:16:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADE11F800F0 Received: (qmail 279415 invoked by uid 1000); 28 Dec 2022 10:16:37 -0500 Date: Wed, 28 Dec 2022 10:16:37 -0500 From: Alan Stern To: Oliver Neukum Subject: Re: [RFC PATCH 06/14] usb: core: hcd: Introduce USB HCD APIs for interrupter management Message-ID: References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-7-quic_wcheng@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, bgoswami@quicinc.com, mathias.nyman@intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, agross@kernel.org, krzysztof.kozlowski+dt@linaro.org, Thinh.Nguyen@synopsys.com, quic_plai@quicinc.com, Wesley Cheng , linux-kernel@vger.kernel.org, quic_jackp@quicinc.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, Dec 28, 2022 at 09:59:03AM +0100, Oliver Neukum wrote: > > > On 27.12.22 22:07, Wesley Cheng wrote: > > > > > Hmmm...maybe I should change the name of the API then to avoid the confusion.  Yes, usb_hcd_flush_endpoint() does ensure that URBs submitted to the EP are stopped.  However, with this offloading concept, we aren't actually submitting URBs from the main processor, so the ep->urb_list will be empty. > > > > This means the usb_hcd_flush_endpoint() API won't actually do anything.  What we need is to ensure that we send a XHCI stop ep command to the controller. > > That is a concept specific to XHCI, yet you are adding a generic > API. The namin should reflect that. usb_quiesce_endpoint() ? Or even xhci_send_stop_ep_cmd(), which is what the routine is intended to do. Alan Stern