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 4EA88C6FD1D for ; Tue, 4 Apr 2023 10:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234285AbjDDKRI (ORCPT ); Tue, 4 Apr 2023 06:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234372AbjDDKRH (ORCPT ); Tue, 4 Apr 2023 06:17:07 -0400 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9E39183 for ; Tue, 4 Apr 2023 03:17:06 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 81A6F581FF5; Tue, 4 Apr 2023 06:17:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 04 Apr 2023 06:17:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1680603424; x=1680607024; bh=RaBdlbb8qtSPpF2y9ZdbaS6K4mx/g7f6hVT 9ANwt864=; b=oSBYF8BHvxMJ2Y2Pb0Ktebt7o4VedxHZ7VxHXCgFlJLaO0HBVE5 LIKc98n4c8M/91/jvf3jXfOo5HLyAcpzTfUC5nXmw/6nF6PffyUVqvYEdvGyPUu7 nAxHNjDDsTBb+HRkW78f7wPcoB7+PXvMPYgE9kXq8E0IAEKKCIUMnvldKhhfaC4w 605GoH1Pbw50yBZTEhbl6VJ3Oz5xdrjTpQ0XGVb3ahgEj5vyTki+gRWbfjeHCthl 42EMeeEr2owotGJdszOp4yYfWIqmwhVKVjHZ4m8VFYKzxQC0Ej7BiDHjapAmObMR xYOirRdSh9ZSDafunn4Qt350qXpvLR3N7/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=i3db14652.fm2; t=1680603424; x=1680607024; bh=RaBdlbb8qtSPpF2y9ZdbaS6K4mx/g7f6 hVT9ANwt864=; b=Sj10per4iUI6nSIQ/R86hHWtkmwbEkFC6ig2GCqe1WzQ48P6 hzHl//vkGwe6fmjLBgohlGXkkcLK1YFyA765tI96olfuXnh26sCqZEFLlRVz25TN +LKLP04h/lT+qHocKe7Hx/o8AVMvc3QQ4xPCnx1CunJEGfQaZbO0p9JGPtGCYdnQ +NMRK36HqUC7QpbynDwYeZzw4vHU9HioaWmNp1gzvj4pESF7Tk2PqEV+x+25J/Dq MiNbx78/5wEnFQgTto609aqU/4ZkCyp/w9oCXH1QdROga1lkqbSRIetMHjL8qsmO +jytJLUamO9aoiqLnTLRJbrEeIHy7jG4DqYnRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeiledgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffrghm ihgvnhcunfgvucfoohgrlhcuoegulhgvmhhorghlsehfrghsthhmrghilhdrtghomheqne cuggftrfgrthhtvghrnhepteefiefhieetgfevhfegfeehffetteduieetudfgleetvdff udelveejfefhfeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepughlvghmohgrlhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i3db14652:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Apr 2023 06:17:01 -0400 (EDT) Message-ID: Date: Tue, 4 Apr 2023 19:16:59 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v4 04/17] PCI: epf-test: Fix DMA transfer completion detection Content-Language: en-US To: Shunsuke Mie , Damien Le Moal , Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Rick Wertenbroek , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Manivannan Sadhasivam , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman References: <20230330085357.2653599-1-damien.lemoal@opensource.wdc.com> <20230330085357.2653599-5-damien.lemoal@opensource.wdc.com> <9a70d819-70d1-fb69-b053-a37ccfacf145@igel.co.jp> From: Damien Le Moal In-Reply-To: <9a70d819-70d1-fb69-b053-a37ccfacf145@igel.co.jp> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 4/4/23 18:47, Shunsuke Mie wrote: >> @@ -120,7 +129,6 @@ static int pci_epf_test_data_transfer(struct pci_epf_test *epf_test, >> struct dma_async_tx_descriptor *tx; >> struct dma_slave_config sconf = {}; >> struct device *dev = &epf->dev; >> - dma_cookie_t cookie; >> int ret; >> >> if (IS_ERR_OR_NULL(chan)) { >> @@ -152,25 +160,33 @@ static int pci_epf_test_data_transfer(struct pci_epf_test *epf_test, >> } >> >> reinit_completion(&epf_test->transfer_complete); >> + epf_test->transfer_chan = chan; >> tx->callback = pci_epf_test_dma_callback; >> tx->callback_param = epf_test; >> - cookie = tx->tx_submit(tx); >> + epf_test->transfer_cookie = tx->tx_submit(tx); > > How about changing the code to use dmaengine_submit() API instead of > calling a raw function pointer? This is done in patch 5 of the series.