From patchwork Wed Aug 28 06:53:31 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: 1977626 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 4Wtw9n3C0zz1yfy for ; Wed, 28 Aug 2024 16:53:49 +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 1sjCYo-0002Fq-Gc; Wed, 28 Aug 2024 06:53:42 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sjCYn-0002FG-0q for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 06:53:41 +0000 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (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-0.canonical.com (Postfix) with ESMTPS id A53B93F183 for ; Wed, 28 Aug 2024 06:53:40 +0000 (UTC) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2d3c976e426so7782486a91.1 for ; Tue, 27 Aug 2024 23:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724828018; x=1725432818; 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=2QQ/d2TNmsLM9VPtZGNw0yE2v6HyRpDKkDMB+nqebBA=; b=gmlaBr56h8iqaNZiVqAlToeGum/TX94yrRrj7JSlMgu371Vd4t35xbQk9FG4TcjpTH GscA1VD99RB5Cz/IRbQlHFJbP51ZmFjIWJWmEj0oirzE1rPJ3gkkWmpQl4Ky0hfYWDF9 NwgAd7dAfNb8TlayuusJ1lTH0TvFODikAid0yds8hT1nOEkyzaTx4RcM1HOtubvJmjp1 9EyGU9G5utaJ41gPCIFfJJJT8DW2jcpewwvyD4UdasXJRSn/d1h+pWdOXV02xkafDZab r+/EpyZwPGfh/4Rs54NoK8dOgNtSXYtxO1rZKnYXB7PWJFkvBtdmVDClqYRo7RiSLl4c C3iw== X-Gm-Message-State: AOJu0YxwSmPykifAzh5l3puu+IhEH7oldiJEtVbzZzoLOefPE4xgoKoM 2WgQuWrWY5MLSZ0jA/Xm0DH/Pa3UGPFPXRY9r7RimgPACS6g7eKsEJru+Ig28/ifZdlqOMRaAAA DT4RZI/SfvMXDLcLeB68CnHAupHxoC6tcyMGoWR9UtI3iud6/+IKiTQUlt61wO1EJqXNNnNwMpb lcp4Ak9TUB+g== X-Received: by 2002:a17:90a:bd0e:b0:2c9:649c:5e10 with SMTP id 98e67ed59e1d1-2d8440ca651mr1380917a91.10.1724828018452; Tue, 27 Aug 2024 23:53:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEv0gfbWmAwEBzo0HSSnWCJMznc5t2popgj3ZOTAeDYTdftegPOsNJ/5/aRFFDryczPOU4FaA== X-Received: by 2002:a17:90a:bd0e:b0:2c9:649c:5e10 with SMTP id 98e67ed59e1d1-2d8440ca651mr1380912a91.10.1724828018076; Tue, 27 Aug 2024 23:53:38 -0700 (PDT) Received: from rickywu0421-ThinkPad-X1-Carbon-Gen-11.. ([122.147.171.160]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d844617777sm821820a91.24.2024.08.27.23.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 23:53:37 -0700 (PDT) From: En-Wei Wu To: kernel-team@lists.ubuntu.com Subject: [SRU][U/O][PATCH v2 1/1] wifi: rtw89: 885xb: reset IDMEM mode to prevent download firmware failure Date: Wed, 28 Aug 2024 14:53:31 +0800 Message-ID: <20240828065332.233203-2-en-wei.wu@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828065332.233203-1-en-wei.wu@canonical.com> References: <20240828065332.233203-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 BugLink: https://bugs.launchpad.net/bugs/2077396 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);