Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2166162rdb; Sun, 4 Feb 2024 19:06:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWP/fVq4Mbl+dgp79HV7qshYJWHg3lX4E7rd2vDvDHeZRdh6eE9LRPlk+o7qn9M19yp/j+ X-Received: by 2002:a17:902:a3c3:b0:1d9:42fa:c238 with SMTP id q3-20020a170902a3c300b001d942fac238mr10932933plb.14.1707102361720; Sun, 04 Feb 2024 19:06:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707102361; cv=pass; d=google.com; s=arc-20160816; b=hdckxA70Y9zPAqqky5/LqtS2eYgNo/vKQI/Fzpy7+C2xF4PnLayexqF4ur9Ten4Cwd rMQWo52f5rlSfqssA/f+C2MscOmpmRh9jW27vg+mDCCRDjZoeF9lGVFfxcRqcCDIX3kZ U0nmJsHFNkWhqEBUgU0J+fFsVkqjyMEc5HOu7DopAYVpeAdmWSj3GUgSPzBl+GSGEgp8 MTIcUBp86b3Hg+HTzNRVd/W5WNPtUkK0dEceCem/4SiXpdrQuSWQjl4fG+/wDoE5XALB VZPocbnwSPL+1xX0IXRK4gyTLnWaE29+pb7az7scOArrvXyEi9ilIg8GjSgF06tCexXY 6ydg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=LoI6qm+frKjZSS9svGxRYOXCzbi0vX9KMLfXqzH8cZk=; fh=m8vpGxVH1GLKq2V0ZfMBxRLfj36FbfULI9fwE0xbWnk=; b=ia1GX7fb4C8crZUEmx2UJQYuKQuZyfpuH42zm+hclgDFOxkKVTy7PwQJ/cDQtCSBmX T5/1zsQalrq9syxR7/m8oFvTZkc+2IA1Sk0f14x8hz8m+6FKPTl8PQJAJhbJDSs6CSej 8xUaugyYbGuItAM+1x1SsAlnU/lA58NkJyc7N1ygobxOODMkSiBQSPcfX+NdpKEO0PSS FLtZysFH/Q2huH408lT/2F7PQ0PxswdIY5c15LPs44Z9nO1e0Ph51swJXjdwcX5Bx7Qu Iz4Ii32I9Vmq8m48Wo2e0ZFO5tVfnYIoaioPcxvSMqiVWdONPuFhfYolUwjTD2eKGGMl 2fLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3121-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXnRO710stVKiNPqQEhMmMiyO4Vu+vPfR3YlTtPbA2y9jNCyZFgDyIu1ZtUtgQIiyhnmOydGaZxCt33uo4qeP4X3C6kvUGvDWYNZ2sq7A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w8-20020a170902a70800b001d8d08bd124si5261586plq.644.2024.02.04.19.06.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 19:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3121-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DC74DB2240F for ; Mon, 5 Feb 2024 03:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 010379449; Mon, 5 Feb 2024 03:05:20 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9950945A; Mon, 5 Feb 2024 03:05:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707102319; cv=none; b=rNceojzOJVY+u/L+zwcTqQGMpmoub8lq0gtGVwVktM3RPCKjrB6kZIPzs6OQ8PQ4BjtxllEGDGJi8L7GeH03bPTdE9lDVtAa7MVsu/Nj/H808T/Lt1ikZmLLLLJvongNgkz+9/xk2hW6a5jMQsWg6QyJtWPt+f9J0n5pfyOMrbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707102319; c=relaxed/simple; bh=aGcz+kwdVgCI14Vhut2k38YHIgfop7qVfXrlTvOjUpU=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=rmjgCC5X4nK1QBlGzn/PuSfrjXEUWj0IHFXBER9osuWrO3BoEx5bBDZO6uLqzUZXQMJ1mTPjxBvpkvX5cFNXfE4QtU1xxSgO8bDfTKwmIgZ8v1Hdg3q+6DyBvmw0hGVr9Wg01CPRcXCdgJcEC7tN5n3JP+Ar39vqgJvyUU5M5ts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 415350ZL03032978, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 415350ZL03032978 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Feb 2024 11:05:00 +0800 Received: from RTEXMBS06.realtek.com.tw (172.21.6.99) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Mon, 5 Feb 2024 11:05:00 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 5 Feb 2024 11:05:00 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f]) by RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f%7]) with mapi id 15.01.2507.035; Mon, 5 Feb 2024 11:05:00 +0800 From: Ping-Ke Shih To: Fiona Klute , "linux-wireless@vger.kernel.org" CC: Kalle Valo , Ulf Hansson , "linux-mmc@vger.kernel.org" , Pavel Machek , =?iso-8859-2?Q?Ond=F8ej_Jirman?= Subject: RE: [PATCH 8/9] wifi: rtw88: Reset 8703b firmware before download Thread-Topic: [PATCH 8/9] wifi: rtw88: Reset 8703b firmware before download Thread-Index: AQHaVdEGm9PdtNCN9kWLwSLylHN2w7D7FCFA Date: Mon, 5 Feb 2024 03:05:00 +0000 Message-ID: <3f625eaee20e4399b8b6ef7d2776a530@realtek.com> References: <20240202121050.977223-1-fiona.klute@gmx.de> <20240202121050.977223-9-fiona.klute@gmx.de> In-Reply-To: <20240202121050.977223-9-fiona.klute@gmx.de> Accept-Language: en-US, zh-TW Content-Language: zh-TW Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 > -----Original Message----- > From: Fiona Klute > Sent: Friday, February 2, 2024 8:11 PM > To: linux-wireless@vger.kernel.org; Ping-Ke Shih > Cc: Kalle Valo ; Ulf Hansson ; = linux-mmc@vger.kernel.org; Pavel > Machek ; Ond=F8ej Jirman ; Fiona Klute > Subject: [PATCH 8/9] wifi: rtw88: Reset 8703b firmware before download >=20 > Sometimes 8703b firmware is still active from previous use when the > driver needs to download the firmware during MAC activation. Reset it > in that case. >=20 > Signed-off-by: Fiona Klute > --- > drivers/net/wireless/realtek/rtw88/mac.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wirel= ess/realtek/rtw88/mac.c > index 298663b035..b6de097e44 100644 > --- a/drivers/net/wireless/realtek/rtw88/mac.c > +++ b/drivers/net/wireless/realtek/rtw88/mac.c > @@ -936,6 +936,12 @@ static int __rtw_download_firmware_legacy(struct rtw= _dev *rtwdev, > { > int ret =3D 0; >=20 > + /* reset firmware if still present */ > + if (rtwdev->chip->id =3D=3D RTW_CHIP_TYPE_8703B && > + rtw_read8(rtwdev, REG_MCUFW_CTRL) & BIT_RAM_DL_SEL) { rtw_read8_mask(rtwdev, REG_MCUFW_CTRL, BIT_RAM_DL_SEL)=20 > + rtw_write8(rtwdev, REG_MCUFW_CTRL, 0x00); > + } > + > en_download_firmware_legacy(rtwdev, true); > ret =3D download_firmware_legacy(rtwdev, fw->firmware->data, fw->= firmware->size); > en_download_firmware_legacy(rtwdev, false); > -- > 2.43.0 >=20