linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
@ 2019-10-16  1:54 Chris Chiu
  2019-10-17  2:26 ` Chris Chiu
  2019-10-22  8:26 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Chiu @ 2019-10-16  1:54 UTC (permalink / raw)
  To: Jes.Sorensen, kvalo, davem; +Cc: linux-wireless, netdev, linux-kernel, linux

The RTL8723BU has problems connecting to AP after each warm reboot.
Sometimes it returns no scan result, and in most cases, it fails
the authentication for unknown reason. However, it works totally
fine after cold reboot.

Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE
for cold reboot and warm reboot, the registers imply that the MAC
is already powered and thus some procedures are skipped during
driver initialization. Double checked the vendor driver, it reads
the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any
during initialization based on them. This commit only tells the
RTL8723BU to do full initialization without checking MAC status.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
---

Note:
  v2: fix typo of commit message


 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h       | 1 +
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 +
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c  | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index 22e95b11bfbb..6598c8d786ea 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1425,6 +1425,7 @@ struct rtl8xxxu_fileops {
 	u8 has_s0s1:1;
 	u8 has_tx_report:1;
 	u8 gen2_thermal_meter:1;
+	u8 needs_full_init:1;
 	u32 adda_1t_init;
 	u32 adda_1t_path_on;
 	u32 adda_2t_path_on_a;
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
index 9ba661b3d767..a1c3787abe2e 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
@@ -1668,6 +1668,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops = {
 	.has_s0s1 = 1,
 	.has_tx_report = 1,
 	.gen2_thermal_meter = 1,
+	.needs_full_init = 1,
 	.adda_1t_init = 0x01c00014,
 	.adda_1t_path_on = 0x01c00014,
 	.adda_2t_path_on_a = 0x01c00014,
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index e4c1b08c8070..8420cb269b8d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -3900,6 +3900,9 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
 	else
 		macpower = true;
 
+	if (fops->needs_full_init)
+		macpower = false;
+
 	ret = fops->power_on(priv);
 	if (ret < 0) {
 		dev_warn(dev, "%s: Failed power on\n", __func__);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
  2019-10-16  1:54 [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot Chris Chiu
@ 2019-10-17  2:26 ` Chris Chiu
  2019-10-21  2:26   ` Chris Chiu
  2019-10-22  8:26 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Chiu @ 2019-10-17  2:26 UTC (permalink / raw)
  To: Jes Sorensen, Kalle Valo, David Miller
  Cc: linux-wireless, netdev, Linux Kernel, Linux Upstreaming Team

On Wed, Oct 16, 2019 at 9:54 AM Chris Chiu <chiu@endlessm.com> wrote:
>
> The RTL8723BU has problems connecting to AP after each warm reboot.
> Sometimes it returns no scan result, and in most cases, it fails
> the authentication for unknown reason. However, it works totally
> fine after cold reboot.
>
> Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE
> for cold reboot and warm reboot, the registers imply that the MAC
> is already powered and thus some procedures are skipped during
> driver initialization. Double checked the vendor driver, it reads
> the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any
> during initialization based on them. This commit only tells the
> RTL8723BU to do full initialization without checking MAC status.
>
> Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>

Sorry, I forgot to add Jes.

Chris
> ---
>
> Note:
>   v2: fix typo of commit message
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
  2019-10-17  2:26 ` Chris Chiu
@ 2019-10-21  2:26   ` Chris Chiu
  2019-10-21  8:29     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Chiu @ 2019-10-21  2:26 UTC (permalink / raw)
  To: Jes Sorensen, Kalle Valo, David Miller
  Cc: linux-wireless, netdev, Linux Kernel, Linux Upstreaming Team

On Thu, Oct 17, 2019 at 10:26 AM Chris Chiu <chiu@endlessm.com> wrote:
>
> On Wed, Oct 16, 2019 at 9:54 AM Chris Chiu <chiu@endlessm.com> wrote:
> >
> > The RTL8723BU has problems connecting to AP after each warm reboot.
> > Sometimes it returns no scan result, and in most cases, it fails
> > the authentication for unknown reason. However, it works totally
> > fine after cold reboot.
> >
> > Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE
> > for cold reboot and warm reboot, the registers imply that the MAC
> > is already powered and thus some procedures are skipped during
> > driver initialization. Double checked the vendor driver, it reads
> > the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any
> > during initialization based on them. This commit only tells the
> > RTL8723BU to do full initialization without checking MAC status.
> >
> > Signed-off-by: Chris Chiu <chiu@endlessm.com>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
>
> Sorry, I forgot to add Jes.
>
> Chris
> > ---
> >
> > Note:
> >   v2: fix typo of commit message
> >
> >

Gentle ping. Cheers.

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
  2019-10-21  2:26   ` Chris Chiu
@ 2019-10-21  8:29     ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-10-21  8:29 UTC (permalink / raw)
  To: Chris Chiu
  Cc: Jes Sorensen, David Miller, linux-wireless, netdev, Linux Kernel,
	Linux Upstreaming Team

Chris Chiu <chiu@endlessm.com> writes:

> On Thu, Oct 17, 2019 at 10:26 AM Chris Chiu <chiu@endlessm.com> wrote:
>>
>> On Wed, Oct 16, 2019 at 9:54 AM Chris Chiu <chiu@endlessm.com> wrote:
>> >
>> > The RTL8723BU has problems connecting to AP after each warm reboot.
>> > Sometimes it returns no scan result, and in most cases, it fails
>> > the authentication for unknown reason. However, it works totally
>> > fine after cold reboot.
>> >
>> > Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE
>> > for cold reboot and warm reboot, the registers imply that the MAC
>> > is already powered and thus some procedures are skipped during
>> > driver initialization. Double checked the vendor driver, it reads
>> > the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any
>> > during initialization based on them. This commit only tells the
>> > RTL8723BU to do full initialization without checking MAC status.
>> >
>> > Signed-off-by: Chris Chiu <chiu@endlessm.com>
>> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
>>
>> Sorry, I forgot to add Jes.
>>
>> Chris
>> > ---
>> >
>> > Note:
>> >   v2: fix typo of commit message
>> >
>> >
>
> Gentle ping. Cheers.

To reduce email please avoid pinging like this, it has been only five
days since you submitted this version and this is not a 24/7 service. I
have documented how you can follow the status from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#checking_state_of_patches_from_patchwork

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
  2019-10-16  1:54 [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot Chris Chiu
  2019-10-17  2:26 ` Chris Chiu
@ 2019-10-22  8:26 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-10-22  8:26 UTC (permalink / raw)
  To: Chris Chiu
  Cc: Jes.Sorensen, davem, linux-wireless, netdev, linux-kernel, linux

Chris Chiu <chiu@endlessm.com> wrote:

> The RTL8723BU has problems connecting to AP after each warm reboot.
> Sometimes it returns no scan result, and in most cases, it fails
> the authentication for unknown reason. However, it works totally
> fine after cold reboot.
> 
> Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE
> for cold reboot and warm reboot, the registers imply that the MAC
> is already powered and thus some procedures are skipped during
> driver initialization. Double checked the vendor driver, it reads
> the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any
> during initialization based on them. This commit only tells the
> RTL8723BU to do full initialization without checking MAC status.
> 
> Signed-off-by: Chris Chiu <chiu@endlessm.com>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

0eeb91ade90c rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot

-- 
https://patchwork.kernel.org/patch/11192201/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-22  8:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16  1:54 [PATCH v2] rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot Chris Chiu
2019-10-17  2:26 ` Chris Chiu
2019-10-21  2:26   ` Chris Chiu
2019-10-21  8:29     ` Kalle Valo
2019-10-22  8:26 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).