[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <81e2104b-69ce-fd26-4b90-55869363ddce@linux.intel.com>
Date: Thu, 21 Apr 2022 14:47:06 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
cc: Netdev <netdev@...r.kernel.org>, linux-wireless@...r.kernel.org,
kuba@...nel.org, davem@...emloft.net, johannes@...solutions.net,
ryazanov.s.a@...il.com, loic.poulain@...aro.org,
m.chetan.kumar@...el.com, chandrashekar.devegowda@...el.com,
linuxwwan@...el.com, chiranjeevi.rapolu@...ux.intel.com,
haijun.liu@...iatek.com, amir.hanania@...el.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
dinesh.sharma@...el.com, eliot.lee@...el.com,
moises.veleta@...el.com, pierre-louis.bossart@...el.com,
muralidharan.sethuraman@...el.com, Soumya.Prakash.Mishra@...el.com,
sreehari.kancharla@...el.com, madhusmita.sahu@...el.com
Subject: Re: [PATCH net-next v6 12/13] net: wwan: t7xx: Device deep sleep
lock/unlock
On Thu, 7 Apr 2022, Ricardo Martinez wrote:
> From: Haijun Liu <haijun.liu@...iatek.com>
>
> Introduce the mechanism to lock/unlock the device 'deep sleep' mode.
> When the PCIe link state is L1.2 or L2, the host side still can keep
> the device is in D0 state from the host side point of view. At the same
> time, if the device's 'deep sleep' mode is unlocked, the device will
> go to 'deep sleep' while it is still in D0 state on the host side.
>
> Signed-off-by: Haijun Liu <haijun.liu@...iatek.com>
> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>
> Co-developed-by: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
> Signed-off-by: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
> ---
> +void t7xx_pci_enable_sleep(struct t7xx_pci_dev *t7xx_dev)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(&t7xx_dev->md_pm_lock, flags);
> + t7xx_dev->sleep_disable_count--;
> + if (atomic_read(&t7xx_dev->md_pm_state) < MTK_PM_RESUMED) {
goto unlock;
> + spin_unlock_irqrestore(&t7xx_dev->md_pm_lock, flags);
> + return;
> + }
> +
> + if (t7xx_dev->sleep_disable_count == 0)
> + t7xx_dev_set_sleep_capability(t7xx_dev, true);
unlock:
> + spin_unlock_irqrestore(&t7xx_dev->md_pm_lock, flags);
> +}
> +
> static int t7xx_send_pm_request(struct t7xx_pci_dev *t7xx_dev, u32 request)
> {
> unsigned long wait_ret;
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
--
i.
Powered by blists - more mailing lists