Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI: Move reset and restore related code to reset-restore.c
Date: Wed, 14 May 2025 09:07:01 +0200	[thread overview]
Message-ID: <aCRBFWHKa02Hu-ec@wunner.de> (raw)
In-Reply-To: <20250512120900.1870-1-ilpo.jarvinen@linux.intel.com>

On Mon, May 12, 2025 at 03:08:57PM +0300, Ilpo Järvinen wrote:
> There are quite many reset and restore related functions in pci.c that
> barely depend on the other functions in pci.c. Create reset-restore.c
> for reset and restore related logic to keep those 1k lines in one place.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Hm, could I get a:

Suggested-by: Lukas Wunner <lukas@wunner.de>

... per:

https://lore.kernel.org/r/Z7hZZNT5NHYncZ3c@wunner.de/

>  drivers/pci/Makefile        |    4 +-
>  drivers/pci/pci.c           | 1015 +----------------------------------
>  drivers/pci/pci.h           |   10 +
>  drivers/pci/reset-restore.c | 1014 ++++++++++++++++++++++++++++++++++

I'd prefer reset.c for succinctness.

That said, this patch conflicts with Mani's slot reset patches
which a lot of people seem to be interested in:

https://lore.kernel.org/r/20250508-pcie-reset-slot-v4-0-7050093e2b50@linaro.org/

Maybe it's better to give Mani's series the advantage and defer
this patch here to the next cycle.


> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -69,15 +69,7 @@ struct pci_pme_device {
>   */
>  #define PCI_RESET_WAIT 1000 /* msec */

I'd move PCI_RESET_WAIT, pci_dev_wait() and
pci_bridge_wait_for_secondary_bus() to reset.c as well.

Then pci_dev_d3_sleep() is the only function which is no longer static.

Thanks,

Lukas

  reply	other threads:[~2025-05-14  7:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 12:08 [PATCH 1/1] PCI: Move reset and restore related code to reset-restore.c Ilpo Järvinen
2025-05-14  7:07 ` Lukas Wunner [this message]
2025-05-14 11:29   ` Ilpo Järvinen
2025-05-14 11:43     ` Lukas Wunner
2025-05-14 12:09       ` Ilpo Järvinen

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=aCRBFWHKa02Hu-ec@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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