Re: [PATCH 1/3] mwifiex: disable ps_mode explicitly by default instead

2020-11-26 Thread Tsuchiya Yuto
On Fri, 2020-11-20 at 13:04 -0800, Brian Norris wrote: > On Fri, Oct 30, 2020 at 1:04 AM Tsuchiya Yuto wrote: > > On Thu, 2020-10-29 at 11:25 -0700, Brian Norris wrote: > > > For the record, Chrome OS supports plenty of mwifiex systems with 8897 > > > (SDIO only) and 8

Re: [PATCH] mwifiex: pcie: add enable_device_dump module parameter

2020-11-26 Thread Tsuchiya Yuto
reply from me. It was difficult to find spare time these days.) > On Fri, Oct 30, 2020 at 3:30 AM Tsuchiya Yuto wrote: > > Let me know if splitting this patch like this works. 1) The first patch > > is to add this module parameter but don't change the default behavior. > >

Re: [PATCH] mwifiex: pcie: skip cancel_work_sync() on reset failure path

2020-11-11 Thread Tsuchiya Yuto
On Tue, 2020-11-10 at 18:51 +, Kalle Valo wrote: > Tsuchiya Yuto wrote: > > > If a reset is performed, but even the reset fails for some reasons (e.g., > > on Surface devices, the fw reset requires another quirks), > > cancel_work_sync() hangs

Re: [PATCH 1/2] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure

2020-11-08 Thread Tsuchiya Yuto
On Sun, 2020-11-08 at 13:31 +0200, Kalle Valo wrote: > Tsuchiya Yuto writes: > > > When FLR is performed but without fw reset for some reasons (e.g. on > > Surface devices, fw reset requires another quirk), it fails to reset > > properly. You can trigger the issue on

Re: [RFC PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on suspend/resume

2020-11-02 Thread Tsuchiya Yuto
On Sat, 2020-10-31 at 00:27 +0900, Tsuchiya Yuto wrote: > On Wed, 2020-10-28 at 23:27 +0900, Tsuchiya Yuto wrote: >> On Microsoft Surface devices (PCIe-88W8897), there are issues with S0ix >> achievement and AP scanning after suspend with the current Host Sleep >> method. >

Re: [RFC PATCH 1/3] mwifiex: pcie: add DMI-based quirk impl for Surface devices

2020-11-02 Thread Tsuchiya Yuto
On Wed, 2020-10-28 at 17:27 +0200, Andy Shevchenko wrote: > On Wed, Oct 28, 2020 at 11:27:51PM +0900, Tsuchiya Yuto wrote: >> This commit adds quirk implementation based on DMI matching with DMI >> table for Microsoft Surface devices that uses mwifiex chip (currently, >> all

Re: [PATCH 2/3] mwifiex: add allow_ps_mode module parameter

2020-11-02 Thread Tsuchiya Yuto
On Fri, 2020-10-30 at 13:02 +0200, Andy Shevchenko wrote: > On Fri, Oct 30, 2020 at 04:58:33PM +0900, Tsuchiya Yuto wrote: > > On Wed, 2020-10-28 at 15:04 -0700, Brian Norris wrote: > > ... > > > On the other hand, I agree that I don't want to break the existing use

Re: [RFC PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on suspend/resume

2020-10-30 Thread Tsuchiya Yuto
On Wed, 2020-10-28 at 23:27 +0900, Tsuchiya Yuto wrote: > On Microsoft Surface devices (PCIe-88W8897), there are issues with S0ix > achievement and AP scanning after suspend with the current Host Sleep > method. > > When using the Host Sleep method, it prevents the platform to reac

Re: [PATCH] mwifiex: pcie: add enable_device_dump module parameter

2020-10-30 Thread Tsuchiya Yuto
On Wed, 2020-10-28 at 17:12 -0700, Brian Norris wrote: > On Wed, Oct 28, 2020 at 3:58 PM Tsuchiya Yuto wrote: > > > > The devicve_dump may take a little bit long time and users may want to > > disable the dump for daily usage. > > > > This commit adds a new mo

Re: [PATCH 0/3] mwifiex: disable ps_mode by default for stability

2020-10-30 Thread Tsuchiya Yuto
On Wed, 2020-10-28 at 17:21 +0200, Andy Shevchenko wrote: > On Wed, Oct 28, 2020 at 11:24:30PM +0900, Tsuchiya Yuto wrote: > > Hello all, > > > > On Microsoft Surface devices (PCIe-88W8897), we are observing stability > > issues when ps_mode (IEEE power_save) is enab

Re: [PATCH 1/3] mwifiex: disable ps_mode explicitly by default instead

2020-10-30 Thread Tsuchiya Yuto
On Thu, 2020-10-29 at 11:25 -0700, Brian Norris wrote: > On Wed, Oct 28, 2020 at 7:04 PM Tsuchiya Yuto wrote: > > > > On Microsoft Surface devices (PCIe-88W8897), the ps_mode causes > > connection unstable, especially with 5GHz APs. Then, it eventually causes > > fw

Re: [PATCH 2/3] mwifiex: add allow_ps_mode module parameter

2020-10-30 Thread Tsuchiya Yuto
On Thu, 2020-10-29 at 13:04 -0400, Willem de Bruijn wrote: > On Wed, Oct 28, 2020 at 9:13 PM Brian Norris wrote: > > > > On Wed, Oct 28, 2020 at 2:56 PM Tsuchiya Yuto wrote: > > > > > > To make the ps_mode (power_save) control easier, this commit adds a new >

Re: [PATCH 2/3] mwifiex: add allow_ps_mode module parameter

2020-10-30 Thread Tsuchiya Yuto
On Wed, 2020-10-28 at 15:04 -0700, Brian Norris wrote: > On Wed, Oct 28, 2020 at 2:56 PM Tsuchiya Yuto wrote: > > > > To make the ps_mode (power_save) control easier, this commit adds a new > > module parameter allow_ps_mode and set it false (disallowed) by default. >

[PATCH 0/3] mwifiex: disable ps_mode by default for stability

2020-10-28 Thread Tsuchiya Yuto
patch adds a message when ps_mode will be changed. Useful when diagnosing connection issues. Thanks, Tsuchiya Yuto [1] https://bugzilla.kernel.org/show_bug.cgi?id=109681 Tsuchiya Yuto (3): mwifiex: disable ps_mode explicitly by default instead mwifiex: add allow_ps_mode module parameter mwif

[PATCH 1/3] mwifiex: disable ps_mode explicitly by default instead

2020-10-28 Thread Tsuchiya Yuto
On Microsoft Surface devices (PCIe-88W8897), the ps_mode causes connection unstable, especially with 5GHz APs. Then, it eventually causes fw crash. This commit disables ps_mode by default instead of enabling it. Required code is extracted from mwifiex_drv_set_power(). Signed-off-by: Tsuchiya

[PATCH 0/2] mwifiex: fixes for shutdown_sw() and reinit_sw()

2020-10-28 Thread Tsuchiya Yuto
be observed easily. While here, update description of shutdown_sw() and reinit_sw() functions to reflect current state. Thanks, Tsuchiya Yuto Tsuchiya Yuto (2): mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure mwifiex: update comment for shutdown_sw()/reinit_sw() to reflect current

[PATCH 1/2] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure

2020-10-28 Thread Tsuchiya Yuto
mwifiex_shutdown_sw() with mwifiex_pcie_remove(), it lacks mwifiex_init_shutdown_fw(). This commit fixes mwifiex_shutdown_sw() by adding the missing mwifiex_init_shutdown_fw(). Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Signed-off-by: Tsuchiya Yuto --- d

[RFC PATCH 3/3] mwifiex: pcie: add reset_wsid quirk for Surface 3

2020-10-28 Thread Tsuchiya Yuto
/05cba925f3a515f222acb5b3551a032ddde958fe/surface_3/dsdt.dsl#L11947-L12011 [2] https://github.com/linux-surface/acpidumps/blob/05cba925f3a515f222acb5b3551a032ddde958fe/surface_pro_3/dsdt.dsl#L12164-L12216 Signed-off-by: Tsuchiya Yuto --- Current issues: 1) After reset with this quirk, ASPM settings don't get restored. Below

[RFC PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on suspend/resume

2020-10-28 Thread Tsuchiya Yuto
-working wifi after suspend. To fix such issues, perform shutdown_sw()/reinit_sw() instead of Host Sleep on suspend/resume. Signed-off-by: Tsuchiya Yuto --- As a side effect, this patch disables wakeups (means that Wake-On-WLAN can't be used anymore, if it was working before), and might also reset

[PATCH] mwifiex: pcie: add enable_device_dump module parameter

2020-10-28 Thread Tsuchiya Yuto
The devicve_dump may take a little bit long time and users may want to disable the dump for daily usage. This commit adds a new module parameter enable_device_dump and disables the device_dump by default. Signed-off-by: Tsuchiya Yuto --- drivers/net/wireless/marvell/mwifiex/pcie.c | 11

[PATCH 3/3] mwifiex: print message when changing ps_mode

2020-10-28 Thread Tsuchiya Yuto
Users may want to know the ps_mode state change (e.g., diagnosing connection issues). This commit adds the print when changing ps_mode. Signed-off-by: Tsuchiya Yuto --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net

[PATCH] mwifiex: pcie: skip cancel_work_sync() on reset failure path

2020-10-28 Thread Tsuchiya Yuto
bring up adapter: -5 kernel: mwifiex_pcie :03:00.0: reinit failed: -5 To reproduce this issue, for example, try putting the root port of wifi into D3 (replace "00:1d.3" with your setup). # put into D3 (root port) sudo setpci -v -s 00:1d.3 CAP_PM+4.b=0b Cc: Maximilian Lu

[PATCH 2/2] mwifiex: update comment for shutdown_sw()/reinit_sw() to reflect current state

2020-10-28 Thread Tsuchiya Yuto
The functions mwifiex_shutdown_sw() and mwifiex_reinit_sw() can be used for more general purposes than the PCIe function level reset. Also, these are even not PCIe-specific. So, let's update the comments at the top of each function accordingly. Signed-off-by: Tsuchiya Yuto --- drivers/net

[RFC PATCH 0/3] mwifiex: add fw reset quirks for Microsoft Surface

2020-10-28 Thread Tsuchiya Yuto
) require a quirk that puts wifi into D3cold before FLR. While here, created new files for quirks (mwifiex/pcie_quirks.c and mwifiex/pcie_quirks.h) because the changes are a little bit too big to add into pcie.c. Thanks, Tsuchiya Yuto Tsuchiya Yuto (3): mwifiex: pcie: add DMI-based quirk impl

[RFC PATCH 1/3] mwifiex: pcie: add DMI-based quirk impl for Surface devices

2020-10-28 Thread Tsuchiya Yuto
This commit adds quirk implementation based on DMI matching with DMI table for Microsoft Surface devices that uses mwifiex chip (currently, all the devices that use mwifiex equip PCIe-88W8897 chip). This implementation can be used for quirks later. Signed-off-by: Tsuchiya Yuto --- drivers/net

[PATCH 2/3] mwifiex: add allow_ps_mode module parameter

2020-10-28 Thread Tsuchiya Yuto
on command failed: Operation not permitted (-1) Signed-off-by: Tsuchiya Yuto --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c

[RFC PATCH 2/3] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+ devices

2020-10-28 Thread Tsuchiya Yuto
: acpi device:4b: Cannot transition to power state D0 for parent in D3hot mwifiex_pcie :03:00.0: can't change power state from D3cold to D0 (config space inaccessible) Signed-off-by: Tsuchiya Yuto --- Current issue: * After reset with this quirk, ASPM settings don't get restored. Below