All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Robert Święcki" <robert@swiecki.net>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-i2c <linux-i2c@vger.kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Linux PCI" <linux-pci@vger.kernel.org>,
	"Linux PM" <linux-pm@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] pci: Don't call resume callback for nearly bound devices
Date: Thu, 11 Nov 2021 11:01:27 -0600	[thread overview]
Message-ID: <20211111170127.GA1336355@bhelgaas> (raw)
In-Reply-To: <20211110211905.GA1261732@bhelgaas>

On Wed, Nov 10, 2021 at 03:19:05PM -0600, Bjorn Helgaas wrote:
> On Wed, Nov 10, 2021 at 05:33:11PM +0100, Robert Święcki wrote:
> > śr., 10 lis 2021 o 15:14 Bjorn Helgaas <helgaas@kernel.org> napisał(a):
> > > On Tue, Nov 09, 2021 at 02:05:18PM -0600, Bjorn Helgaas wrote:
> > > > On Tue, Nov 09, 2021 at 07:58:47PM +0100, Rafael J. Wysocki wrote:
> > > > > On Tue, Nov 9, 2021 at 7:52 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > > > > ...
> > >
> > > > > > So instead, we can drop the pm_runtime_get_sync() and
> > > > > > pm_runtime_put_sync() from local_pci_probe() and pci_device_remove(),
> > > > > > respectively, and add pm_runtine_get_noresume() to pci_pm_init(),
> > > > > > which will prevent PM-runtime from touching the device until it has a
> > > > > > driver that supports PM-runtime.
> > > > > >
> > > > > > We'll lose the theoretical ability to put unbound devices into D3 this
> > > > > > way, but we learned some time ago that this isn't safe in all cases
> > > > > > anyway.
> > > > >
> > > > > IOW, something like this (untested and most likely white-space-damaged).
> > > >
> > > > Thanks!  I applied this manually to for-linus in hopes of making the
> > > > the next linux-next build.
> > > >
> > > > Please send any testing reports and corrections to the patch and
> > > > commit log!
> > >
> > > Robert, I hate to ask even more of you, but if you have a chance, it
> > > would be very helpful if you could test the patch below.  I'm pretty
> > > sure it should fix the problem you saw, and I hope to ask Linus to
> > > merge it today.
> > 
> > I think the most recent patch creates some timeouts and other problems
> > in pci-related code? Things I haven't seen before. But, granted, my
> > kernel testing approach is not with focus on details, so maybe I did
> > sth wrong.
> 
> Thank you very much for testing this.  The patch changed the way we
> use runtime PM, and the dmesg snippets below look like they could be
> related to runtime PM issues.
> 
> I think the conclusion is that we need to revert these commits:
> 
>   b5f9c644eb1b ("PCI: Remove struct pci_dev->driver")
>   2a4d9408c9e8 ("PCI: Use to_pci_driver() instead of pci_dev->driver")
> 
> from Linus' tree.  I queued up those reverts on
> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/log/?h=for-linus

These reverts appeared in the Nov 11 linux-next tree.  Any chance you
could verify that they solve the i2c_dw_pci_resume() issue?  If it's
easier, you can apply them from:
https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/log/?h=for-linus
instead.

Bjorn

  reply	other threads:[~2021-11-11 17:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAP145pgwt7svtDwcD=AStKTt_GSN-ZqPL2u74Y63TAY5ghAagQ@mail.gmail.com>
     [not found] ` <CAP145pgrL-tOHrxsKwk_yzQihyk4TMFrgBb6zhNgC1i2wUTCeQ@mail.gmail.com>
2021-11-08 15:37   ` Fwd: Crashes in 5.15-git in i2c code Robert Święcki
2021-11-08 16:34     ` Robert Święcki
2021-11-08 18:58       ` Bjorn Helgaas
2021-11-08 19:09         ` Bjorn Helgaas
2021-11-08 21:22         ` [PATCH] pci: Don't call resume callback for nearly bound devices Uwe Kleine-König
2021-11-08 21:36           ` Robert Święcki
2021-11-09  0:00             ` Krzysztof Wilczyński
2021-11-09  2:56           ` Bjorn Helgaas
2021-11-09  6:42             ` Greg Kroah-Hartman
2021-11-09  6:59             ` Uwe Kleine-König
2021-11-09 12:42               ` Robert Święcki
2021-11-10 21:26                 ` Bjorn Helgaas
2021-11-10 22:01                   ` Robert Święcki
2021-11-09 17:18               ` Rafael J. Wysocki
2021-11-09 18:12                 ` Bjorn Helgaas
2021-11-09 18:52                   ` Rafael J. Wysocki
2021-11-09 18:58                     ` Rafael J. Wysocki
2021-11-09 20:05                       ` Bjorn Helgaas
2021-11-09 20:43                         ` Uwe Kleine-König
2021-11-10 14:14                         ` Bjorn Helgaas
2021-11-10 16:33                           ` Robert Święcki
2021-11-10 16:48                             ` Rafael J. Wysocki
2021-11-10 17:59                               ` Bjorn Helgaas
2021-11-10 21:19                             ` Bjorn Helgaas
2021-11-11 17:01                               ` Bjorn Helgaas [this message]
2021-11-11 17:32                                 ` Robert Święcki
2021-11-11 18:09                                   ` Bjorn Helgaas

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=20211111170127.GA1336355@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robert@swiecki.net \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.