Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8994422rwp; Wed, 19 Jul 2023 20:10:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvrRbsOZyZdBDogb9+e8OTF86nfDwCUnRKrdf54qaFQ5RYEQsROlUpSYR3ijo6eSfjS6s8 X-Received: by 2002:ac8:5907:0:b0:403:325d:53f5 with SMTP id 7-20020ac85907000000b00403325d53f5mr22896636qty.19.1689822646967; Wed, 19 Jul 2023 20:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689822646; cv=none; d=google.com; s=arc-20160816; b=IG5Vi9bfdiy4abdlxMlvcQEyr8iTpFxACszq/VuZh9Gvwx1hBlajU2ZsV1h8SDcGBL /aDGy13m1NFnNetezoMJiwTlptAZ2kE+SqB/ysvpWSohEbYQqvyepnoRQtzr+hwVrLtx e1OLaFPR90Xg1K6XihPlcj1y2jZeFaKg7RRguG4QPFHmrSgdTztb7RXV/+MZ4fQeaUSv 2cjxhxDAfRIPf1hRVOEmJn1CvC4+I9ocXRvDM02Ta5aEjfAlowsakhkUikaMJ6CzYoGb LRaEDAPrsDBARQkADjiQvHW3GY5PsKnoa7UtmPdY4lQkUm0zbyKoSH9+U3xW0vaFNNDz PSZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1G1KQnh8oV290E3bxkJUDDggYqIukSILf8V5Rh/Jf6g=; fh=239N9TPK33Qn7ha+Q0sQ3fNhJmIROSC7xWfxOgJDZ+k=; b=KOOkjnCVpIaRekVXMg9DNaJEQxOXSFqOn6jpql9PfVxv4tqknJDoWWz8oQYVQUU4rm fNfpynj7ZeqIkuwxFSTz8ZeMcvJ+5lVyLPrWd4e4fTyufEwIH2aiep3TGeivmNMdMRpe GMZt0r/L07poJdHpxg62dwtdnt06ZfciLPAHFl8okTAC6Akj8n4FGb4UM9nFJHryfc4M rT1BBo+qQZ/D8LfTdH96W0aZlK6KoDLxHdsHBuNwimjKSjEigRI0knWfRQuJheO35LTi QjDXvj6WRleveXqguxQVS5b/L2yNWuvfYWuwodgObJ73qa6tI052N8vYw6UG5lM0Lnd0 m3uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MMMlW1Q8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a637b41000000b005636ef310adsi789989pgn.597.2023.07.19.20.10.39; Wed, 19 Jul 2023 20:10:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MMMlW1Q8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbjGTCxC (ORCPT + 58 others); Wed, 19 Jul 2023 22:53:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjGTCw5 (ORCPT ); Wed, 19 Jul 2023 22:52:57 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78228172D for ; Wed, 19 Jul 2023 19:52:56 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36K2nhFP010177; Thu, 20 Jul 2023 02:52:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=1G1KQnh8oV290E3bxkJUDDggYqIukSILf8V5Rh/Jf6g=; b=MMMlW1Q8VMbDOWm+X/CDDstSPSqjDk4EEIDH3t7qPvF4OFebJBzNia/5Z2eenitdyPP+ +E6SvSz129E0L7MQMiqUHyMjpUjRFvHTiODXZ6rG6lyXraz0itSctJ2UJXNBLFsxlcb9 KdWkemLuEqypkewyRFnHOTIzV5OBe+WrDSnUuXQ9IvqF1tmmOFNCfee1Qg+1+LcQ3U1O cuJEza4zLGljx8KAGvuBMHmJreLkiKt5lqYwAD9fERcO2/VXrV6zfcz1ntyts4cjFD3d LJOpQiy4TWARLbGxyJV/c8zTl6/q6ka4Z60GJDMb0A/wQc8Br+GLqF/wZWQeAqIAbiGA IA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rxg3v9g1e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 02:52:49 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36K2qmTA029339 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 02:52:48 GMT Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (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.30; Wed, 19 Jul 2023 19:52:47 -0700 From: Wen Gong To: CC: , Subject: [PATCH 1/3] wifi: ath12k: configure RDDM size to mhi for device recovery Date: Wed, 19 Jul 2023 22:52:30 -0400 Message-ID: <20230720025232.7701-2-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230720025232.7701-1-quic_wgong@quicinc.com> References: <20230720025232.7701-1-quic_wgong@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: Xq_S1Hy2GmEEQV7HM-tBbZLdVweKhL6- X-Proofpoint-ORIG-GUID: Xq_S1Hy2GmEEQV7HM-tBbZLdVweKhL6- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-19_16,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 spamscore=0 bulkscore=0 adultscore=0 mlxscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 mlxlogscore=730 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307200020 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-wireless@vger.kernel.org RDDM is RAM DUMP DUBUG module, it is used to debugging issue when firmware hit error. The rddm_size is needed by firmware while MHI enter RDDM state, add it to support device recovery when ath12k receive MHI_CB_EE_RDDM message. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath12k/hw.c | 3 +++ drivers/net/wireless/ath/ath12k/hw.h | 1 + drivers/net/wireless/ath/ath12k/mhi.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index 5991cc91cd00..c69cfca67f7d 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -907,6 +907,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .hal_ops = &hal_qcn9274_ops, .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01), + .rddm_size = 0, }, { .name = "wcn7850 hw2.0", @@ -964,6 +965,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01) | BIT(CNSS_PCIE_PERST_NO_PULL_V01), + .rddm_size = 0x780000, }, { .name = "qcn9274 hw2.0", @@ -1019,6 +1021,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .hal_ops = &hal_qcn9274_ops, .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01), + .rddm_size = 0, }, }; diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h index e6c4223c283c..7d82b76ad021 100644 --- a/drivers/net/wireless/ath/ath12k/hw.h +++ b/drivers/net/wireless/ath/ath12k/hw.h @@ -186,6 +186,7 @@ struct ath12k_hw_params { const struct hal_ops *hal_ops; u64 qmi_cnss_feature_bitmap; + u32 rddm_size; }; struct ath12k_hw_ops { diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c index 42f1140baa4f..91b2abf6da44 100644 --- a/drivers/net/wireless/ath/ath12k/mhi.c +++ b/drivers/net/wireless/ath/ath12k/mhi.c @@ -366,6 +366,7 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci) mhi_ctrl->fw_image = ab_pci->amss_path; mhi_ctrl->regs = ab->mem; mhi_ctrl->reg_len = ab->mem_len; + mhi_ctrl->rddm_size = ab->hw_params->rddm_size; ret = ath12k_mhi_get_msi(ab_pci); if (ret) { -- 2.40.1