From patchwork Tue Aug 20 07:40:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: En-Wei Wu X-Patchwork-Id: 1974278 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wp1bJ75kJz1yfg for ; Tue, 20 Aug 2024 17:40:28 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sgJTU-0000Km-MS; Tue, 20 Aug 2024 07:40:16 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sgJTS-0000KF-Kg for kernel-team@lists.ubuntu.com; Tue, 20 Aug 2024 07:40:14 +0000 Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4E2273F6A6 for ; Tue, 20 Aug 2024 07:40:14 +0000 (UTC) Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-2705e14211dso2590153fac.3 for ; Tue, 20 Aug 2024 00:40:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724139613; x=1724744413; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VoBRV7y30djCwRF5Ytv55/OT3+An8L+Yp3Mf+wACoP4=; b=KsyeRxrgq9yC0hP66g/soSMk5USv/GHVWQC0mzzsZ/A+JkcxHOHPQ0bcGNCLPx5POk LlvfsODHFoWrJCgLfWjQ0q+l1ZkXYU2GGuEHNQnpJuHBHHKFfq5TSorT4pMoLLpqZp57 wWIXztG55KWbUPDmmTx8/MZ8HqZPHYHzq8TFXGg3sCSbM7u4w0eYPcicOQERZ7XHJnhr j08kX9ukYjcwcKJqs0Vda9HH4dDkNS1YaCOyVZaW3QrKAqqrsfyKXftRK6rzQ6vwrCBB WBtFKbgGze3n5CDuEFOKH9JJJdtuxgNFAGBOp0Yq2ljVCQ/eRm/7JZVZHDPsAfJS4+Uu nOng== X-Gm-Message-State: AOJu0Yyv5RGHGVYysrKbOdjWL+AfxYwmZVxcXlPob8LyH52PcxORUHxM kuxK+VfRXSiTw9X4w9cfmlPpU356NkgB6BXRu+3ePfG1cWCKZwx9+HUNzfyJmjxhxwcAj6qrW1t U01x6RmiGYEqx+HhU8r7NTUANyobBJp1FI6f8xPejAT6nY2LKBc5E29HaSTdqBK9BTakMHmOIZL ZWUQpSdmEMUg== X-Received: by 2002:a05:6870:968b:b0:260:eae3:5ec2 with SMTP id 586e51a60fabf-2701c3e497amr15850439fac.26.1724139612825; Tue, 20 Aug 2024 00:40:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQiYbrzT/RqpZp4QW1dCmlv8Gr5I/yayUADxE4xr7K7eVp1O38ObyxwAlPnkCdKsNG6V2bMw== X-Received: by 2002:a05:6870:968b:b0:260:eae3:5ec2 with SMTP id 586e51a60fabf-2701c3e497amr15850417fac.26.1724139612437; Tue, 20 Aug 2024 00:40:12 -0700 (PDT) Received: from rickywu0421-ThinkPad-X1-Carbon-Gen-11.. ([122.147.171.160]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127ae6cfdcsm7906648b3a.95.2024.08.20.00.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 00:40:12 -0700 (PDT) From: En-Wei Wu To: kernel-team@lists.ubuntu.com Subject: [SRU][U/O][PATCH 1/1] wifi: rtw89: 885xb: reset IDMEM mode to prevent download firmware failure Date: Tue, 20 Aug 2024 15:40:07 +0800 Message-ID: <20240820074008.104993-2-en-wei.wu@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240820074008.104993-1-en-wei.wu@canonical.com> References: <20240820074008.104993-1-en-wei.wu@canonical.com> MIME-Version: 1.0 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: Ping-Ke Shih For different firmware type, it could change IDMEM mode, so reset it to default to avoid encountering error for RTL8851B/RTL8852B/RTL8852BT if that kind of firmware was downloaded before. rtw89_8851be 0000:02:00.0: Firmware version 0.29.41.3, cmd version 0, type 5 rtw89_8851be 0000:02:00.0: Firmware version 0.29.41.3, cmd version 0, type 3 rtw89_8851be 0000:02:00.0: MAC has already powered on rtw89_8851be 0000:02:00.0: fw security fail rtw89_8851be 0000:02:00.0: download firmware fail rtw89_8851be 0000:02:00.0: [ERR]fwdl 0x1E0 = 0x62 rtw89_8851be 0000:02:00.0: [ERR]fwdl 0x83F2 = 0x8 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f51c rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f524 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f51c rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f500 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f51c rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f53c rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f520 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f520 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f508 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f534 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f520 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f534 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f508 rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f53c rtw89_8851be 0000:02:00.0: [ERR]fw PC = 0xb892f524 rtw89_8851be 0000:02:00.0: failed to setup chip information rtw89_8851be: probe of 0000:02:00.0 failed with error -16 Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240724052626.12774-4-pkshih@realtek.com (cherry picked from commit 80fb81bb46a57daedd5decbcc253ea48428a254e linux-next) Signed-off-by: En-Wei Wu --- drivers/net/wireless/realtek/rtw89/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c index e2399796aeb1..297b1d98d256 100644 --- a/drivers/net/wireless/realtek/rtw89/mac.c +++ b/drivers/net/wireless/realtek/rtw89/mac.c @@ -3781,7 +3781,7 @@ static int rtw89_mac_enable_cpu_ax(struct rtw89_dev *rtwdev, u8 boot_reason, rtw89_write32(rtwdev, R_AX_WCPU_FW_CTRL, val); - if (rtwdev->chip->chip_id == RTL8852B) + if (rtw89_is_rtl885xb(rtwdev)) rtw89_write32_mask(rtwdev, R_AX_SEC_CTRL, B_AX_SEC_IDMEM_SIZE_CONFIG_MASK, 0x2);