Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp474431pxb; Tue, 14 Sep 2021 01:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2M2qKn5YIdcnaBAhER3sCubcRwkXrQtAjjIVTW1yPbDQPuRgn0VtUpZVhSfJsEcoE1uHa X-Received: by 2002:a17:906:1b15:: with SMTP id o21mr10953515ejg.473.1631608782929; Tue, 14 Sep 2021 01:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631608782; cv=none; d=google.com; s=arc-20160816; b=GBlowDCM/Nvmui7oFt4kKilHEOfIU+CFZr7a6h1SeMCS3F2G6/IWHqKMs3VSk8oaWn vGuDtcFJoqfwonYqLTx5rLJ6ATKcc4Aru7B11SsP3PLLesaZ7eRh6Pgk0Ez5egoJ9+7c IpDSSYsgpbfsMI/xbA3wt/xTVj2SvKCGLg0csF/c92Eo9HYZoNMPZo/jZ+oKpA4jXzc0 MA4FLwiWexidBmVjj/xCsvaMqFcajpcJ9zuiYyHTAvO5e9UDpJ39k88Ns3DedIquvgow pznPFrnMUyL6CGDeYjzak5qWU7YibWI8RYkXLq4PAatjXJuiSfHsEU5monBx733MoUuK Ap3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dmarc-filter:sender:dkim-signature; bh=ThxMhkVj/OTj4p4TH0zWh6uCc1CbZd7A1TXlOIaUUwU=; b=M++BnmOJutRNW/PuQ8cNC6PqsOH6WVtQDguzz5bGbnnyjiLGz29kX23C+9OepCVcBT oz/hbffShoXzVKnBvUIH1oK56EIe/c9aP/5TO/qwBT96Ec3ojjfil94LD/380GMMMLkL 5pwNlljAzrKARYgUXQgtEFaUIv0xUMdF9UUQSqwFnayZF+ermvFyGSYDniN20tDpCC9B ApZItOXCOfDVxhsfzjeIDxC2LyeqLHQeOKGOz+7mTAYip06moArVfupR7nm3hq1vkyuz TDVKhFV7bw8UcRRq64Zv7RQHQrhC8H+MxIv0s2db96CKNxNEYDdiQmrkfdoXyXDAjWAq I7/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=PSFudoHo; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si10476809edk.458.2021.09.14.01.39.18; Tue, 14 Sep 2021 01:39:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=PSFudoHo; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbhINIh6 (ORCPT + 99 others); Tue, 14 Sep 2021 04:37:58 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:16981 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbhINIh5 (ORCPT ); Tue, 14 Sep 2021 04:37:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1631608601; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=ThxMhkVj/OTj4p4TH0zWh6uCc1CbZd7A1TXlOIaUUwU=; b=PSFudoHoW9Q9wt5wvMCD9OdFcT/1pye8hZs4N37y028g5ovqjWM+7ksuAaY5CWLKHBr15iwz EodaaGzoOV4opqt+1arvlhEj4nbNOfM04pnHc5O2abBgioKMk+ZmImPhfD0okC/g2bq3ixoV TdmmdAkLqyLT9olYoXh35/h2gcE= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 61405f18bd6681d8edc5c07b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 14 Sep 2021 08:36:40 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 751B9C43460; Tue, 14 Sep 2021 08:36:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, MISSING_DATE,MISSING_MID,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from tykki.adurom.net (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6F3F1C4338F; Tue, 14 Sep 2021 08:36:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 6F3F1C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/3] ath11k: Split PCI write/read functions From: Kalle Valo In-Reply-To: <20210913180902.193874-2-jouni@codeaurora.org> References: <20210913180902.193874-2-jouni@codeaurora.org> To: Jouni Malinen Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Baochen Qiang , Jouni Malinen User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-Id: <20210914083639.751B9C43460@smtp.codeaurora.org> Date: Tue, 14 Sep 2021 08:36:39 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Jouni Malinen wrote: > ath11k_pci_write32/read32 tries to wake up MHI before doing actual > write/read work, which means each time a u32 is written/read, MHI > wake up is performed. This is not necessary in case where we do a > large amount of write/read, cause only one time of wake up is needed. > So split each one into two parts, the first part does MHI get/put > and the second one does actual write/read work. > > Also avoid the put operation if the previous get operation fails. > > Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 > > Signed-off-by: Baochen Qiang > Signed-off-by: Jouni Malinen > Signed-off-by: Kalle Valo This causes new warnings: drivers/net/wireless/ath/ath11k/pci.c:177:6: error: no previous prototype for 'ath11k_pci_do_write32' [-Werror=missing-prototypes] drivers/net/wireless/ath/ath11k/pci.c:224:5: error: no previous prototype for 'ath11k_pci_do_read32' [-Werror=missing-prototypes] I fixed them in the pending branch like this: --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c @@ -174,7 +174,7 @@ static inline u32 ath11k_pci_get_window_start(struct ath11k_base *ab, return window_start; } -void ath11k_pci_do_write32(struct ath11k_base *ab, u32 offset, u32 value) +static void ath11k_pci_do_write32(struct ath11k_base *ab, u32 offset, u32 value) { struct ath11k_pci *ab_pci = ath11k_pci_priv(ab); u32 window_start; @@ -221,7 +221,7 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value) mhi_device_put(ab_pci->mhi_ctrl->mhi_dev); } -u32 ath11k_pci_do_read32(struct ath11k_base *ab, u32 offset) +static u32 ath11k_pci_do_read32(struct ath11k_base *ab, u32 offset) { struct ath11k_pci *ab_pci = ath11k_pci_priv(ab); u32 val, window_start; -- https://patchwork.kernel.org/project/linux-wireless/patch/20210913180902.193874-2-jouni@codeaurora.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches