Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5867481rdb; Thu, 14 Dec 2023 01:41:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IE87juw0LGPG1pnqy7J3Rg4LB1YLswkdYZIDDJAaG4ni+cpWkeS7ixhfJHPHHMwUDWdcBQj X-Received: by 2002:a17:902:e887:b0:1d3:3768:9095 with SMTP id w7-20020a170902e88700b001d337689095mr5245348plg.2.1702546875488; Thu, 14 Dec 2023 01:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702546875; cv=none; d=google.com; s=arc-20160816; b=iwYg154XE/8i2SSk+3hpSexJAtevJkol0KTa7XUjaHKPOEGF/XqUfG+/0WsuxVSBSs mBpGl1uoJQ2bXlOU24G1Sf/7jtiPRXuTJeoaeQDsfedIrwasWdhpqamKGewOQLZ4B5BZ at81fP3sJ7K4Qm6bts76yB7JSUjLAjtwVxvuuSe27FFYHTZWmASZhQMb03lGJYVQMu/Y 7I2Ruas6TnCH+XqktY03w0ARgBAZL5NFQKTxZLKZdYk6HUyzIPTziMnVRaZhJSdKMuBx gQOZxoNhpS2KMhWY2wjD9KLbHssH9B7wuMBGUgG1I6ESRqRmA2Ia3P+EeNFNboUmwLe1 KBDw== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ylZKeaeVio8dJQPPzUpdLFA/Xy9jSrZkzVN2dfqdK5Y=; fh=qz5Nt7PtV0XjRby4PWlOFm+rK1wfRF8r7A0t/nLSRFM=; b=D+H0nSR/6vFlxyOofq5XKobFvlzyTn/RRS/JkD4rV7+6SZyunV0dtm9Pg2Weym3v+i dJcWDvV3DLw/xTI3Fgqd9xq/XvI36J8KIU6XAjYzZcatbf59Bkm/mwgo1TJpeumGTsal Xjdtfo01Mn/rEYj0mJx8dYRmuJuBoPBLXDOCW4rJxWuYEDUeiEqt3GNiqlMXGGXCDXJR hgwD4zHvweo/8IKK8Lp1tym3/5wFnQLRVy0HOuDcYRIJAPxAGeuKrspMGXGzhVfkvG0G uwhnT6XNLj8z2nSyFd5lDNs94UhykI0q1g4lBm3GaDL3ovRFoTZpgyFA3xe7smXVMaY2 sSkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ie4VzWtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o12-20020a170902bccc00b001cc692bf120si10832744pls.61.2023.12.14.01.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 01:41:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ie4VzWtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BDB99809E88E; Thu, 14 Dec 2023 01:40:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443458AbjLNJkT (ORCPT + 99 others); Thu, 14 Dec 2023 04:40:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjLNJkS (ORCPT ); Thu, 14 Dec 2023 04:40:18 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85E53B7; Thu, 14 Dec 2023 01:40:24 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BE5BZ8V000884; Thu, 14 Dec 2023 09:40:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=ylZKeaeVio8dJQPPzUpdLFA/Xy9jSrZkzVN2dfqdK5Y=; b=ie 4VzWtIoTJoKnZ2KCiiOUtdJ+HqaBrVgvcFVkqPUEHX7pLjRVxtHJ5Q2/GR7iCvDb hF9EDnCYy446BswYuIqpSrwcG2cqoqNB+6IS8ovUI0XJuMe9HxQWlygIpWJ9ZAt2 Q0csHlUTnMm4J3VZkk1ArttF5Y4lSahwneHT0cf8F5LJSzJzAzfe4kH1jG9+8iCO ArS00x0vj9RqwidIV8/C4SeviPUzY72ZkxJ8/8iJTgGnE3ez1DDbxWcjObKmPckr xRINraZXDrfWE3Ht/aHDdmRRjv6/JeFj0o4qBGmtk9JNieMrW3ICCanlC1zu7ArQ P8Ip6AuWZsjyVx/fky0g== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uyq2try5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 09:40:09 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BE9e8Tf026735 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 09:40:08 GMT Received: from [10.217.219.216] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 14 Dec 2023 01:40:05 -0800 Message-ID: Date: Thu, 14 Dec 2023 15:10:01 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH 6/9] PCI: epf-mhi: Enable MHI async read/write support Content-Language: en-US To: Manivannan Sadhasivam , , CC: , , , , , References: <20231127124529.78203-1-manivannan.sadhasivam@linaro.org> <20231127124529.78203-7-manivannan.sadhasivam@linaro.org> From: Krishna Chaitanya Chundru In-Reply-To: <20231127124529.78203-7-manivannan.sadhasivam@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: D4LrvjH_ipBuxno5YuE7y02tarNOxuc5 X-Proofpoint-ORIG-GUID: D4LrvjH_ipBuxno5YuE7y02tarNOxuc5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 phishscore=0 clxscore=1011 mlxlogscore=818 priorityscore=1501 lowpriorityscore=0 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312140062 X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Thu, 14 Dec 2023 01:40:35 -0800 (PST) On 11/27/2023 6:15 PM, Manivannan Sadhasivam wrote: > 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; I think the read_async & write async should be updated inside the if condition where MHI_EPF_USE_DMA flag is set. - Krishna Chaitanya. > } > > /* Register the MHI EP controller */