Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1199150pxb; Mon, 11 Oct 2021 00:06:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDsjWOoep/xkUDrhnCtf3SMb5bZl33LxabTsoGxH1WUPC3BljQCTVNYjKo3Df5m+jxiv7X X-Received: by 2002:a17:906:646:: with SMTP id t6mr994319ejb.197.1633935960023; Mon, 11 Oct 2021 00:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633935960; cv=none; d=google.com; s=arc-20160816; b=dy4dE1bRzHWYcBF1k7m2LItrOamHrtNlUXAB21Y+fDdtG2nxVy1OEVmyxiaxBlb3WC 726SIhcireNiQbXSliKiXn6Mxd3jl/m2wSlwkdeklDAFqVEKfgGx1zYTnh332wN0VwXH UhUP9I9VYzcu9okx++qJ8Ah8dmZ5g9+NDNF2lX7VPeyFkfaIdx9cCiZZFikIJpN1xzKJ IH7/PBYt3ZQF8F2rs4Q1BwRP8iS6x3LPPp76jV7SifWDVHg2xOBAhqzMO8qHJ2Ui6cYF 4018/Y8j3gAwlRw3dUMWyhQKgGCvsGetoAD5yS7do0Jy1HolgBHa+nYa3dB6U6ctxknf Xw3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=EamqBaRBazvCb9XIvwzVIEFksV1A2LDT0Z8P1y+560w=; b=yEusl2LbIJlHFgQjtJp5IuDSKpcOa06rPWx3ig6de2Y5O6mqsCyU9TQAqPO+KpA8KZ 54jfCHPd4uv4oAxI6vbvOE85kFEAb0l17MUTJAiYI4hFkhj+OaImmn5XMqodJwhsReHB EOEl6QY2feyKa28NauMj/s+ZoZpkCMmUiO8USOEZRQLe3eibQG8wrXPPnX9mJI+wCcP7 fyVOMQQ3FXa6qrW+m4jfutTWcF724ATR/cxoR9QRekyv9547KPZtAqe8z2tcU5NaOMOX sQ7dNRsjMY9+d/dCSFeJVLHl3AauAqFnZKYk7xi6Ex1OaxLZP4Pql+0wLDNSHiefRDLd 5z9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=R2fbXXKP; 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 8si9481117edx.278.2021.10.11.00.05.42; Mon, 11 Oct 2021 00:06:00 -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=R2fbXXKP; 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 S234138AbhJKGUk (ORCPT + 76 others); Mon, 11 Oct 2021 02:20:40 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:56978 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbhJKGUi (ORCPT ); Mon, 11 Oct 2021 02:20:38 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1633933119; h=Content-Transfer-Encoding: MIME-Version: Message-Id: Date: Subject: Cc: To: From: Sender; bh=EamqBaRBazvCb9XIvwzVIEFksV1A2LDT0Z8P1y+560w=; b=R2fbXXKPeOdLe7ms2KftY2RWeu6J1tvg1jj+OMC9vFIMbUECWodGg8vMj52wHYZKakty1VWg gSOapdug74ceCu90tfjedRAVOvhWyagL18PvE9Iv7h9VUVPrlbMFzBcfN1JTzf/BqJehdsBF cTN3q0Ca/YYNbPQdADLlueCfHxk= X-Mailgun-Sending-Ip: 69.72.43.7 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-n01.prod.us-west-2.postgun.com with SMTP id 6163d73303355859c82a5f15 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 11 Oct 2021 06:18:27 GMT Sender: bqiang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D0A61C4338F; Mon, 11 Oct 2021 06:18:27 +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=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from bqiang-Celadon-RN.qca.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bqiang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1A3DDC4360D; Mon, 11 Oct 2021 06:18:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 1A3DDC4360D 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 From: Baochen Qiang To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH] ath11k: Advertise PLATFORM_CAP_PCIE_GLOBAL_RESET in qmi msg Date: Mon, 11 Oct 2021 13:56:02 +0800 Message-Id: <20211011055602.77342-1-bqiang@codeaurora.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Inform firmware that host is capable of triggering a global reset. This is requested by firmware team. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang --- drivers/net/wireless/ath/ath11k/core.c | 5 +++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/qmi.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 969bf1a590d9..5601f758a0a6 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -71,6 +71,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = false, }, { .hw_rev = ATH11K_HW_IPQ6018_HW10, @@ -112,6 +113,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = false, }, { .name = "qca6390 hw2.0", @@ -152,6 +154,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = true, .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .fix_l1ss = true, + .global_reset = true, }, { .name = "qcn9074 hw1.0", @@ -190,6 +193,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = false, .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), .fix_l1ss = true, + .global_reset = false, }, { .name = "wcn6855 hw2.0", @@ -230,6 +234,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_suspend = true, .hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855), .fix_l1ss = false, + .global_reset = true, }, }; diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h index 62f5978b3005..82952ef9abec 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -163,6 +163,7 @@ struct ath11k_hw_params { bool supports_suspend; u32 hal_desc_sz; bool fix_l1ss; + bool global_reset; }; struct ath11k_hw_ops { diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index b5e34d670715..16f2adb54d03 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -13,6 +13,7 @@ #define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02 #define HOST_CSTATE_BIT 0x04 +#define PLATFORM_CAP_PCIE_GLOBAL_RESET 0x08 bool ath11k_cold_boot_cal = 1; EXPORT_SYMBOL(ath11k_cold_boot_cal); @@ -1556,6 +1557,9 @@ static int ath11k_qmi_host_cap_send(struct ath11k_base *ab) req.nm_modem |= SLEEP_CLOCK_SELECT_INTERNAL_BIT; } + if (ab->hw_params.global_reset) + req.nm_modem |= PLATFORM_CAP_PCIE_GLOBAL_RESET; + ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi host cap request\n"); ret = qmi_txn_init(&ab->qmi.handle, &txn, -- 2.25.1