Search Linux Wireless

Re: [PATCH] wifi: wilc1000: Keep slot powered on during suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/21/24 20:37, Marek Vasut wrote:
> The WILC3000 can suspend and enter low power state. According to local
> measurements, the WILC3000 consumes the same amount of power if the slot
> is powered up and WILC3000 is suspended, and if the WILC3000 is powered
> off. Use the former option, keep the WILC3000 powered up as that allows
> for things like WoWlan to work.
> 
> Note that this is tested on WILC3000 only, not on WILC1000 .
> 
> Signed-off-by: Marek Vasut <marex@xxxxxxx>
> ---
> Cc: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
> Cc: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
> Cc: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
> Cc: Kalle Valo <kvalo@xxxxxxxxxx>
> Cc: Marek Vasut <marex@xxxxxxx>
> Cc: linux-wireless@xxxxxxxxxxxxxxx
> ---
>  drivers/net/wireless/microchip/wilc1000/sdio.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
> index 683a35c682a8f..41122199d51eb 100644
> --- a/drivers/net/wireless/microchip/wilc1000/sdio.c
> +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
> @@ -973,7 +973,6 @@ static int wilc_sdio_suspend(struct device *dev)
>  {
>  	struct sdio_func *func = dev_to_sdio_func(dev);
>  	struct wilc *wilc = sdio_get_drvdata(func);
> -	int ret;
>  
>  	dev_info(dev, "sdio suspend\n");
>  
> @@ -987,13 +986,7 @@ static int wilc_sdio_suspend(struct device *dev)
>  
>  	wilc_sdio_disable_interrupt(wilc);
>  
> -	ret = wilc_sdio_reset(wilc);
> -	if (ret) {
> -		dev_err(&func->dev, "Fail reset sdio\n");
> -		return ret;
> -	}
> -
> -	return 0;
> +	return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
>  }

This change breaks suspend/resume on my wilc1000 setup (sama5d2 wlsom evk +
wilc1000 sd):

# echo mem > /sys/power/state
PM: suspend entry (deep)
Filesystems sync: 0.055 seconds
Freezing user space processes
Freezing user space processes completed (elapsed 0.018 seconds)
OOM killer disabled.
Freezing remaining freezable tasks
Freezing remaining freezable tasks completed (elapsed 0.006 seconds)
wilc1000_sdio mmc0:0001:1: sdio suspend
wilc1000_sdio mmc0:0001:1: PM: dpm_run_callback(): pm_generic_suspend returns -22
wilc1000_sdio mmc0:0001:1: PM: failed to suspend async: error -22
PM: Some devices failed to suspend, or early wake event detected
OOM killer enabled.
Restarting tasks ... done.
random: crng reseeded on system resumption
PM: suspend exit
sh: write error: Invalid argument

But I have to dig more to really understand the root cause.

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux