From nobody Fri Sep 25 13:55:22 2026 Received: from nova.nubenode.com (nova.nubenode.com [46.4.179.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E11C33ADA7; Fri, 11 Sep 2026 17:39:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.179.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789148368; cv=none; b=oJ0hOhjZIeR9gdIpfY4ndvbrS11OhWCvFq6g+uEftiFWBA4XUszN2BgKjZiSYebzSsu39r7B6jmMLzYCvvldyJwh8CgLZdgb0x3AWJ+oNetru9YWvx5L5p8ZIP2STfnndt8GDWXjzgGSLx/v14Hjk8XUjCyJMQWtuG56L/PaTSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789148368; c=relaxed/simple; bh=4oD2gflppFcCCdIEnPKlBKlKwZEn5ipFmZXdNlfSN0I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: In-Reply-To:References; b=otMLMg46LCjqG9kISk9Pdd6VF7iefdRH4zv88rEARGwUmIqt3OzlqWoDA03o8gtIj5h2X9ejdL+O3SneFer6aS6WSNMjn/6SEB0pIEoF0cnKmuO/jLXh85rWgzW2AH2lPvN6E3pBOQ0SuTv0GnMoFwJTiX3dTGIgk59e2SEEGmI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cristiandeluxe.dev; spf=pass smtp.mailfrom=cristiandeluxe.dev; dkim=pass (2048-bit key) header.d=cristiandeluxe.dev header.i=@cristiandeluxe.dev header.b=YMenTbNZ; arc=none smtp.client-ip=46.4.179.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cristiandeluxe.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cristiandeluxe.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cristiandeluxe.dev header.i=@cristiandeluxe.dev header.b="YMenTbNZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cristiandeluxe.dev; s=default; h=References:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nhSy1Kupm2gejwNjHkaXCrMxsoinBsXCFu3HvyR3WHw=; b=YMenTbNZjd9geo6o/vwY8vKqel 2ocPj6QDlcPGtE9k0vlPJH4XbQ2JHi/B3VnsvJOW+L/NzXH0HPzJPuASIX/dUrpXfwUTfDhVeXK38 FWffUE+E7auWBxEAtZlQuoSbOW3Qbco/CvSi90TQU71R6ikWM8wW8X9XcpY4KNmOR2iS8iePtDNTn 1D1Dbw0NSxjUBRkgKbWMDb9bdZkWImbUxh/brhHaNHQ+vTUhp3OkjOA/lVubHvUoFF76TPj1A/kjb ZGPa1efFgC4wEqUrzj1S3YCbQvmjhevsYL6vueIP468ydLVVHXamHJQb9XkDs692yuT6m/l9vgEH3 dCi5OrIg==; Received: from cristiandev by nova.nubenode.com with local (Exim 4.99.5) (envelope-from ) id 1x55De-00000000RJi-391V; Fri, 11 Sep 2026 19:39:23 +0200 From: Cristian Deluxe To: Ping-Ke Shih Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] wifi: rtw88: 8703b: complete the card-disable to card-emulation transition Date: Fri, 11 Sep 2026 17:38:11 +0200 Message-ID: <178914109042.64584.1377616159988360897@cristiandeluxe.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: sendmail (hand-assembled, git-email unavailable on host) In-Reply-To: <178914109042.64584.1681714272474754544@cristiandeluxe.dev> References: <178914109042.64584.1681714272474754544@cristiandeluxe.dev> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - nova.nubenode.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [1103 978] / [47 12] X-AntiAbuse: Sender Address Domain - cristiandeluxe.dev X-Get-Message-Sender-Via: nova.nubenode.com: authenticated_id: cristiandev/from_h X-Authenticated-Sender: nova.nubenode.com: me@cristiandeluxe.dev X-Source: X-Source-Args: X-Source-Dir: /root Content-Type: text/plain; charset="utf-8" On an RTL8723CS the driver cannot power the MAC on after a warm reboot: the power-on sequence waits forever for power ready and probe fails. rtw88_8723cs mmc2:0001:1: failed to poll offset=3D0x6 mask=3D0x2 value=3D= 0x2 rtw88_8723cs mmc2:0001:1: mac power on failed trans_carddis_to_cardemu_8703b has a single entry, clearing the hardware power-down bit. Its sibling trans_carddis_to_cardemu_8723d has six more, and 8822b and 8822c carry the same SDIO pair: withdraw the SDIO suspend request on local register 0x86 and wait for the interface to leave the suspended state, clear the WL suspend bit alongside the power-down bit, and take the 12H LDO out of sleep mode. The transition is the reverse of trans_cardemu_to_carddis_8703b, which sets 0x23[4] and asks the interface to suspend, so with those operations missing neither is ever undone. The chip then comes back with the WLAN MAC unpowered while the SDIO function still enumerates and CMD52 still works, and nothing in the sequence wakes it. rtw_mac_pre_system_cfg() does not cover it either: it returns early for 8051 wcpu chips, of which this is one. It survives a reboot on any board where WL_REG_ON is the only reset the host has and the chip's rail is not switchable. On the Denver TAQ-102 the pwrseq reset line, the BT enable line, the 32.768 kHz clock and every switchable PMIC rail were each toggled against a wedged chip and none of them cleared it, while the vendor driver recovered it every time. Take the operations 8723d has and this table lacks. That table's USB-only and PCI-only entries are left out: this chip has no such variant. Tested on an RTL8723CS over SDIO: recovers a chip left wedged by a previous boot, and survives repeated warm reboots and loader-mode flash cycles. Signed-off-by: Cristian Deluxe Acked-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/rtw8703b.c | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8703b.c b/drivers/net/wi= reless/realtek/rtw88/rtw8703b.c index b5e7ae7eb..67bbd70f4 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c @@ -187,11 +187,38 @@ static const struct rtw_pwr_seq_cmd trans_pre_enable_= 8703b[] =3D { }; =20 static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8703b[] =3D { + /* clear WL suspend enable and HW power down enable */ {0x0005, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(7), 0}, + RTW_PWR_CMD_WRITE, BIT(3) | BIT(7), 0}, + /* withdraw the SDIO suspend request */ + {0x0086, + RTW_PWR_CUT_ALL_MSK, + RTW_PWR_INTF_SDIO_MSK, + RTW_PWR_ADDR_SDIO, + RTW_PWR_CMD_WRITE, BIT(0), 0}, + /* and wait for the interface to leave the suspended state */ + {0x0086, + RTW_PWR_CUT_ALL_MSK, + RTW_PWR_INTF_SDIO_MSK, + RTW_PWR_ADDR_SDIO, + RTW_PWR_CMD_POLLING, BIT(1), BIT(1)}, + /* disable WL suspend */ + {0x0005, + RTW_PWR_CUT_ALL_MSK, + RTW_PWR_INTF_ALL_MSK, + RTW_PWR_ADDR_MAC, + RTW_PWR_CMD_WRITE, BIT(3) | BIT(4), 0}, + /* take the 12H LDO back out of sleep mode, which the card-disable + * transition put it into + */ + {0x0023, + RTW_PWR_CUT_ALL_MSK, + RTW_PWR_INTF_SDIO_MSK, + RTW_PWR_ADDR_MAC, + RTW_PWR_CMD_WRITE, BIT(4), 0}, {TRANS_SEQ_END}, }; =20 --=20 2.51.0 From nobody Fri Sep 25 13:55:22 2026 Received: from nova.nubenode.com (nova.nubenode.com [46.4.179.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D163F38C40E; Fri, 11 Sep 2026 17:39:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.179.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789148394; cv=none; b=G7ciHC9IFrs1ljJ3YGPm2H0w6SECR2WvbvokrZ0xhbtsBQ7r3CzKwy4+DZ3vmu1lug39sxdCuwWa4YkCEXG/mkMVshHMaYjpRcqm+udu68H5JHqmmHxo/6R8B5Wk+HZuI/YEWR+vztQ3SEtg+uE/m6i8x5ErwrC118cvVQDVk2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789148394; c=relaxed/simple; bh=j4CUhv1QLcEu0+ak7TLFO32/Pf38l/f42ONd5EExPvs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: In-Reply-To:References; b=roPYF2qv5wjtmhudrQIR3YDd+A4bGWYJrRTlHNqu9cH31TqEefG8gh37x8ccRIvws6xi+qBW9ujs/9546oVLb3Zna3hM0jib0QfelwXM82PRsrIVSQ1z/EPUUUgMlQdIZuwJXTT2IaBNUQIurmuwoA9Qt8xsa2KhF3WIas2i9gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cristiandeluxe.dev; spf=pass smtp.mailfrom=cristiandeluxe.dev; dkim=pass (2048-bit key) header.d=cristiandeluxe.dev header.i=@cristiandeluxe.dev header.b=b/SCbX6g; arc=none smtp.client-ip=46.4.179.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cristiandeluxe.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cristiandeluxe.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cristiandeluxe.dev header.i=@cristiandeluxe.dev header.b="b/SCbX6g" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cristiandeluxe.dev; s=default; h=References:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2XPjYYHQB59xTSnxAKCR9wFwi40L5z7iGdr3RaF0B94=; b=b/SCbX6g/Ek0rUAouQG4n22DVB tYcuD3WwqTAjhEfmkRofhaDDZci4EVcGW7zWNGHN22yCtR/Dyu+7wNqghKJvBhBsTGny2c1GCXAaz wTjCchtS6PYbRxUr5OvfgGb24YGlR9iYYU9SSBuIvnQIIXxTdkWaCxOWe/4JQeUkYZGnit+qNoJ6l TCwXEDKVGuroQ2r8KldS5x59sC4sqKevoSX3VFccpypz/oyGmO7BD+UgNM2e9iS19kdoRxBAw3UiJ 1WCKclZySV9CuuhNs/QmV2DtoSerkU8EWi5gnORZBeKFFH58AUKZhP3jyezFtlxWMXSIMnaVKgeRc ryqB5xVA==; Received: from cristiandev by nova.nubenode.com with local (Exim 4.99.5) (envelope-from ) id 1x55E5-00000000RSS-0i7P; Fri, 11 Sep 2026 19:39:49 +0200 From: Cristian Deluxe To: Ping-Ke Shih Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] wifi: rtw88: 8703b: stop the PCIe DMA write reaching SDIO Date: Fri, 11 Sep 2026 17:38:12 +0200 Message-ID: <178914109042.64584.11316164845616306056@cristiandeluxe.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: sendmail (hand-assembled, git-email unavailable on host) In-Reply-To: <178914109042.64584.1681714272474754544@cristiandeluxe.dev> References: <178914109042.64584.1681714272474754544@cristiandeluxe.dev> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - nova.nubenode.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [1103 978] / [47 12] X-AntiAbuse: Sender Address Domain - cristiandeluxe.dev X-Get-Message-Sender-Via: nova.nubenode.com: authenticated_id: cristiandev/from_h X-Authenticated-Sender: nova.nubenode.com: me@cristiandeluxe.dev X-Source: X-Source-Args: X-Source-Dir: /root Content-Type: text/plain; charset="utf-8" The first entry of trans_act_to_lps_8703b writes 0xff to MAC register 0x301 on every interface. That register is the PCIe DMA control, and both trans_act_to_lps_8723d and Realtek's own 8703b sequence header restrict the same entry to PCI, where it is commented "PCIe DMA stop". So on an RTL8723CS, which is SDIO only, every transition into low power poked a PCIe register for no reason. Restrict it the way the sibling chip and the vendor both do. Tested on an RTL8723CS over SDIO: the interface goes down and back up, reassociates and takes an address, and a warm reboot brings Wi-Fi back with no change in behaviour. Signed-off-by: Cristian Deluxe Acked-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/rtw8703b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8703b.c b/drivers/net/wi= reless/realtek/rtw88/rtw8703b.c --- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c @@ -412,7 +412,7 @@ static const struct rtw_pwr_seq_cmd trans_act_to_reset_= mcu_8703b[] =3D { static const struct rtw_pwr_seq_cmd trans_act_to_lps_8703b[] =3D { {0x0301, RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_ALL_MSK, + RTW_PWR_INTF_PCI_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, 0xff, 0xff}, {0x0522, --=20 2.51.0