From patchwork Tue Oct 19 16:25:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1543498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYfJG16PKz9sR4 for ; Wed, 20 Oct 2021 03:26:22 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mcrwK-0006V5-3C; Tue, 19 Oct 2021 16:26:12 +0000 Received: from mail-pg1-f169.google.com ([209.85.215.169]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mcrwC-0006J5-B3 for kernel-team@lists.ubuntu.com; Tue, 19 Oct 2021 16:26:04 +0000 Received: by mail-pg1-f169.google.com with SMTP id h193so4457316pgc.1 for ; Tue, 19 Oct 2021 09:25:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iToGaDf6DDAebavuqEs6slbWlNm2AROGyCNhO4NDNsg=; b=56L76xikjomkBnOveDiMTHQ28smcGb83RqWFddy3b79+Mz36hLAOGsLsRkgBxx4zrh AGBWRHnmOKMgrdjYs7GgX2nyxVimlUgvIQcjdoDas5fqdzAox1sQk5rTEiL6jQxSg9uf a6I/6VcH5/x0zeuuFot/UaoaRsPE2h6KBMmkTjfnMStDgb/WDzmtpRV/Pws0giS9W4Dr ibQXQ+vQjtGBqkLe17VSUqSx/IbTjFy8A2BGKlXqpJNOY48y/US2A/MYtGLOKJoqlRkU dwEzagvo95vFL71usaktrNXlBJGSV2mmCzaaRejowQlkFQK6kluKRsC3yb7V3+XdVfBf uHdA== X-Gm-Message-State: AOAM532M2BFP5Ct6t2DQDFBpkeoAfPogZKwO5SR3lXHCYD/UyggZQwaL 4ZQxkAWSWzZIwgdNxLA/ycAz5ZqDcuo= X-Google-Smtp-Source: ABdhPJzrBG6RtPheVQ73w9yvp/Iu2TmpYGAVG17s936VvpTljLh9r07gqYjvC63ZwShVe5b2LUd9GA== X-Received: by 2002:a62:804a:0:b0:44c:5bfd:7765 with SMTP id j71-20020a62804a000000b0044c5bfd7765mr807250pfd.83.1634660756794; Tue, 19 Oct 2021 09:25:56 -0700 (PDT) Received: from localhost (220-142-196-159.dynamic-ip.hinet.net. [220.142.196.159]) by smtp.gmail.com with ESMTPSA id p12sm8744574pfh.52.2021.10.19.09.25.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:25:56 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 04/33][SRU][OEM-5.13] ath11k: setup WBM_IDLE_LINK ring once again Date: Wed, 20 Oct 2021 00:25:19 +0800 Message-Id: <20211019162548.1408217-5-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211019162548.1408217-1-vicamo.yang@canonical.com> References: <20211019162548.1408217-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.169; envelope-from=vicamo@gmail.com; helo=mail-pg1-f169.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Baochen Qiang BugLink: https://bugs.launchpad.net/bugs/1939528 For WCN6855, WBM idle link ring needs a reinit. Without this reinit, firmware crash might happen occasionally. This is requested by the hw team. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-5-jouni@codeaurora.org (cherry picked from commit ed66849e159ba92a91ccde13ce3aebd90c644e05) Signed-off-by: You-Sheng Yang --- drivers/net/wireless/ath/ath11k/hal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index 08e3c72d9237e..eaa0edca55761 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -382,6 +382,16 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *ab, val = FIELD_PREP(HAL_REO1_RING_ID_ENTRY_SIZE, srng->entry_size); ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_ID_OFFSET(ab), val); + if (srng->ring_id == HAL_SRNG_RING_ID_WBM_IDLE_LINK) { + ath11k_hif_write32(ab, reg_base, (u32)srng->ring_base_paddr); + val = FIELD_PREP(HAL_TCL1_RING_BASE_MSB_RING_BASE_ADDR_MSB, + ((u64)srng->ring_base_paddr >> + HAL_ADDR_MSB_REG_SHIFT)) | + FIELD_PREP(HAL_TCL1_RING_BASE_MSB_RING_SIZE, + (srng->entry_size * srng->num_entries)); + ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_BASE_MSB_OFFSET(ab), val); + } + /* interrupt setup */ /* NOTE: IPQ8074 v2 requires the interrupt timer threshold in the * unit of 8 usecs instead of 1 usec (as required by v1).