* [PATCH] PCI: Move pci_info() after pci_fixup_device() in pci_setup_device()
@ 2020-07-27 7:06 Tiezhu Yang
2020-07-29 22:53 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Tiezhu Yang @ 2020-07-27 7:06 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel
In the current code, we can not see the PCI info after fixup which is
correct to reflect the reality, it is better to move pci_info() after
pci_fixup_device() in pci_setup_device().
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/pci/probe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2f66988..7c046aed 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1802,9 +1802,6 @@ int pci_setup_device(struct pci_dev *dev)
dev->revision = class & 0xff;
dev->class = class >> 8; /* upper 3 bytes */
- pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
- dev->vendor, dev->device, dev->hdr_type, dev->class);
-
if (pci_early_dump)
early_dump_pci_device(dev);
@@ -1822,6 +1819,9 @@ int pci_setup_device(struct pci_dev *dev)
/* Early fixups, before probing the BARs */
pci_fixup_device(pci_fixup_early, dev);
+ pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
+ dev->vendor, dev->device, dev->hdr_type, dev->class);
+
/* Device class may be changed after fixup */
class = dev->class >> 8;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: Move pci_info() after pci_fixup_device() in pci_setup_device()
2020-07-27 7:06 [PATCH] PCI: Move pci_info() after pci_fixup_device() in pci_setup_device() Tiezhu Yang
@ 2020-07-29 22:53 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-07-29 22:53 UTC (permalink / raw)
To: Tiezhu Yang; +Cc: Bjorn Helgaas, linux-pci, linux-kernel
On Mon, Jul 27, 2020 at 03:06:55PM +0800, Tiezhu Yang wrote:
> In the current code, we can not see the PCI info after fixup which is
> correct to reflect the reality, it is better to move pci_info() after
> pci_fixup_device() in pci_setup_device().
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Applied to pci/enumeration for v5.9, thanks!
> ---
> drivers/pci/probe.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 2f66988..7c046aed 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -1802,9 +1802,6 @@ int pci_setup_device(struct pci_dev *dev)
> dev->revision = class & 0xff;
> dev->class = class >> 8; /* upper 3 bytes */
>
> - pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
> - dev->vendor, dev->device, dev->hdr_type, dev->class);
> -
> if (pci_early_dump)
> early_dump_pci_device(dev);
>
> @@ -1822,6 +1819,9 @@ int pci_setup_device(struct pci_dev *dev)
> /* Early fixups, before probing the BARs */
> pci_fixup_device(pci_fixup_early, dev);
>
> + pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
> + dev->vendor, dev->device, dev->hdr_type, dev->class);
> +
> /* Device class may be changed after fixup */
> class = dev->class >> 8;
>
> --
> 2.1.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-29 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 7:06 [PATCH] PCI: Move pci_info() after pci_fixup_device() in pci_setup_device() Tiezhu Yang
2020-07-29 22:53 ` Bjorn Helgaas
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).