Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5516145rdb; Wed, 13 Dec 2023 10:48:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWv/S6OmyzE70nT+2F7p9Y05prUXg8tj5o7ScZZvkQ54p3FvSVHjayVQm7Z46CpNZKgZQl X-Received: by 2002:a17:90a:c08:b0:287:731b:cf9 with SMTP id 8-20020a17090a0c0800b00287731b0cf9mr6702350pjs.34.1702493317934; Wed, 13 Dec 2023 10:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702493317; cv=none; d=google.com; s=arc-20160816; b=MJfBKbPBV46n1CopAwki6PaKdZcQGsizihFzJK5AHdO2wf4qG7rLM67GQ2FA1niAPk gh2WLzoU7RF9K+vVnsOY3HklMKxVOH83EkVWgxUcB+MMDoCLEs/yXX/3kR3F+oUTK1yD eZMiVLg+54CTWLimqJf23+qT2fDxNO58Slw928jGE3DclSHBZY3xHg+C8MvyMF+6smFU uCM/BSg4S0qmYS/jIJW0AueU+UIzPUuf8C2YgJMc3tcLx8y5uNABpJJdTOMR6zyMdiws cisSYVwTN6YsdXj0z15NGSF7bo9r565zKtqE39mL6yGfoNY+Z5wd/i3m5M2fcpLokPJC vvmw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mgP80Yyu6IvFK797HjxiOfl5XynuTDj7ZNa6KXUx8cI=; fh=R9/X0S8Y6On/oR+e1yMtb8pCo73KBZzA3x8LZJtAq5c=; b=EJtz5F3KoIr6NtrNrIuBIt//l99ls9F6g+KHrX1s4FPy3TAx1bpv2l7p+hKbv8Ih+p EHNY4D0btsMwGu2fGjW9AwYK2sMOQs96xTosCQ5JUBSFV9J+It/TtL1KwXrcVj8eAVrh UIJ+revHWwZC8+KeaZcwhg3IjS9ucoCsLaiyknVQRjIfq/9ndcSDrsC3BH7ATngUSnH4 GFmmXdxDy2FckS1VDsjxvUzo/BA48dwnKBThEg2+uxwIdQWvoFDfpHyW1NneWSkMdW/K Q6zWqxx03G0K/9F1HyJRjfSH2v9AAJdSAq3ewlaa9GRf2UT1LH/VePhOQhJrVfkmmhQ7 dQLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v7-20020a17090a898700b002888f4155c8si10024506pjn.126.2023.12.13.10.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C4671802D236; Wed, 13 Dec 2023 10:48:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233651AbjLMSs1 (ORCPT + 99 others); Wed, 13 Dec 2023 13:48:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233545AbjLMSsZ (ORCPT ); Wed, 13 Dec 2023 13:48:25 -0500 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 434FBE4; Wed, 13 Dec 2023 10:48:32 -0800 (PST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d35dc7e1bbso5244025ad.1; Wed, 13 Dec 2023 10:48:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702493311; x=1703098111; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mgP80Yyu6IvFK797HjxiOfl5XynuTDj7ZNa6KXUx8cI=; b=ktdZTHfwEv+bA0TgZ7zJGQ8ma2s5oIYtrDSMYzYfwLPl7Sv6M+Vy/b695rFLtpSf+v H/co8NvXeq+MTPJnZD6BPRP35qrqpyxE/fnVqfTylTnPVuMm4gJzxHSSI3+loyGyCkcX R9BWPvOeQHkwwcOzkUuZ9Juu5WzUyMZClKwp2FhaIK1YQdwS5PYDQeN6uCsdtG3H3Vie gzGkN8wcqnCfkyCo1WxOlkwEtcrUaCYzecN0RUDk8h55uNzmyMLHqt1fhfBREWkBYc+Z tpICZoPzhkbkGG8RHq40kTgUOiqPGRB8S4HlDmUxJg4wP4/XoCezZpLtNR5Gbiq+S+h9 VMhA== X-Gm-Message-State: AOJu0Yz/s7kDI93cS9qBp3yWZF3cs6i9n4VOKKVYamQl/3ICoxYocCK8 meKvKazUd68H0N99whfW/z0= X-Received: by 2002:a17:902:ec8a:b0:1d0:d18c:bc5a with SMTP id x10-20020a170902ec8a00b001d0d18cbc5amr10203494plg.121.1702493311471; Wed, 13 Dec 2023 10:48:31 -0800 (PST) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id t14-20020a1709027fce00b001cf8c062610sm11107415plb.127.2023.12.13.10.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:48:30 -0800 (PST) Date: Thu, 14 Dec 2023 03:48:29 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Manivannan Sadhasivam Cc: lpieralisi@kernel.org, kishon@kernel.org, bhelgaas@google.com, mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/9] PCI: epf-mhi: Enable MHI async read/write support Message-ID: <20231213184829.GA924726@rocinante> References: <20231127124529.78203-1-manivannan.sadhasivam@linaro.org> <20231127124529.78203-7-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231127124529.78203-7-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:48:36 -0800 (PST) Hello, Manivannan, you will be taking this through the MHI tree, correct? > Now that both eDMA and iATU are prepared to support async transfer, let's > enable MHI async read/write by supplying the relevant callbacks. > > In the absence of eDMA, iATU will be used for both sync and async > operations. > > Signed-off-by: Manivannan Sadhasivam > --- > drivers/pci/endpoint/functions/pci-epf-mhi.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c > index 3d09a37e5f7c..d3d6a1054036 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c > +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c > @@ -766,12 +766,13 @@ static int pci_epf_mhi_link_up(struct pci_epf *epf) > mhi_cntrl->raise_irq = pci_epf_mhi_raise_irq; > mhi_cntrl->alloc_map = pci_epf_mhi_alloc_map; > mhi_cntrl->unmap_free = pci_epf_mhi_unmap_free; > + mhi_cntrl->read_sync = mhi_cntrl->read_async = pci_epf_mhi_iatu_read; > + mhi_cntrl->write_sync = mhi_cntrl->write_async = pci_epf_mhi_iatu_write; > if (info->flags & MHI_EPF_USE_DMA) { > mhi_cntrl->read_sync = pci_epf_mhi_edma_read; > mhi_cntrl->write_sync = pci_epf_mhi_edma_write; > - } else { > - mhi_cntrl->read_sync = pci_epf_mhi_iatu_read; > - mhi_cntrl->write_sync = pci_epf_mhi_iatu_write; > + mhi_cntrl->read_async = pci_epf_mhi_edma_read_async; > + mhi_cntrl->write_async = pci_epf_mhi_edma_write_async; > } Looks good! Reviewed-by: Krzysztof WilczyƄski Krzysztof