lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Oct 2022 18:21:39 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     "Kancharla, Sreehari" <sreehari.kancharla@...ux.intel.com>
Cc:     Loic Poulain <loic.poulain@...aro.org>, netdev@...r.kernel.org,
        kuba@...nel.org, davem@...emloft.net, johannes@...solutions.net,
        ryazanov.s.a@...il.com, m.chetan.kumar@...el.com,
        chandrashekar.devegowda@...el.com, linuxwwan@...el.com,
        chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
        ricardo.martinez@...ux.intel.com, dinesh.sharma@...el.com,
        ilpo.jarvinen@...ux.intel.com, moises.veleta@...el.com,
        sreehari.kancharla@...el.com
Subject: Re: [PATCH net-next 2/2] net: wwan: t7xx: Add NAPI support

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@...ux.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.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ