From: "Kancharla, Sreehari" <sreehari.kancharla@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Loic Poulain <loic.poulain@linaro.org>,
netdev@vger.kernel.org, kuba@kernel.org, davem@davemloft.net,
johannes@sipsolutions.net, ryazanov.s.a@gmail.com,
m.chetan.kumar@intel.com, chandrashekar.devegowda@intel.com,
linuxwwan@intel.com, chiranjeevi.rapolu@linux.intel.com,
haijun.liu@mediatek.com, ricardo.martinez@linux.intel.com,
dinesh.sharma@intel.com, ilpo.jarvinen@linux.intel.com,
moises.veleta@intel.com, sreehari.kancharla@intel.com
Subject: Re: [PATCH net-next 2/2] net: wwan: t7xx: Add NAPI support
Date: Thu, 20 Oct 2022 19:52:26 +0530 [thread overview]
Message-ID: <eef5cc64-190d-12e4-5318-212bbc9511b0@linux.intel.com> (raw)
In-Reply-To: <Y0Q4gwO1uyHFN0XT@smile.fi.intel.com>
Hi Andy,
On 10/10/2022 8:51 PM, Andy Shevchenko wrote:
> On Mon, Oct 10, 2022 at 07:52:49PM +0530, Kancharla, Sreehari wrote:
>> On 9/12/2022 6:23 PM, Loic Poulain wrote:
>>> On Fri, 9 Sept 2022 at 18:40, Sreehari Kancharla
>>> <sreehari.kancharla@linux.intel.com> wrote:
> ...
>
>>>> if (!rxq->que_started) {
>>>> atomic_set(&rxq->rx_processing, 0);
>>>> - dev_err(dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
>>>> - return;
>>>> + dev_err(rxq->dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
>>>> + return work_done;
>>>> }
>>>>
>>>> - ret = pm_runtime_resume_and_get(dpmaif_ctrl->dev);
>>>> - if (ret < 0 && ret != -EACCES)
>>>> - return;
>>>> + if (!rxq->sleep_lock_pending) {
>>>> + ret = pm_runtime_resume_and_get(rxq->dpmaif_ctrl->dev);
>>> AFAIK, polling is not called in a context allowing you to sleep (e.g.
>>> performing a synced pm runtime operation).
>> Device will be in resumed state when NAPI poll is invoked from IRQ context,
>> but host/driver can trigger RPM suspend to device. so we are using pm_runtime_resume_and_get
>> here to prevent runtime suspend.
> If it's known that device is always in power on state here, there is no need to
> call all this, but what you need is to bump the reference counter. Perhaps you
> need pm_runtime_get_noresume(). I.o.w. find the proper one and check that is
> not sleeping.
Agree, incrementing the reference counter will be sufficient. we will replace
pm_runtime_resume_and_get with pm_runtime_get_noresume in v2 submission.
Regards,
Sreehari
next prev parent reply other threads:[~2022-10-20 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 16:34 [PATCH net-next 1/2] net: wwan: t7xx: Use needed_headroom instead of hard_header_len Sreehari Kancharla
2022-09-09 16:35 ` [PATCH net-next 2/2] net: wwan: t7xx: Add NAPI support Sreehari Kancharla
2022-09-12 12:53 ` Loic Poulain
2022-10-10 14:22 ` Kancharla, Sreehari
2022-10-10 15:21 ` Andy Shevchenko
2022-10-20 14:22 ` Kancharla, Sreehari [this message]
2022-09-13 10:45 ` Ilpo Järvinen
2022-09-13 16:53 ` [PATCH net-next 1/2] net: wwan: t7xx: Use needed_headroom instead of hard_header_len Sergey Ryazanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eef5cc64-190d-12e4-5318-212bbc9511b0@linux.intel.com \
--to=sreehari.kancharla@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=davem@davemloft.net \
--cc=dinesh.sharma@intel.com \
--cc=haijun.liu@mediatek.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linuxwwan@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@intel.com \
--cc=moises.veleta@intel.com \
--cc=netdev@vger.kernel.org \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.com \
--cc=sreehari.kancharla@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).