archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <>
To: "Ville Syrjälä" <>
Cc: "Krzysztof Wilczyński" <>,
	"Bjorn Helgaas" <>,
	"Oliver O'Halloran" <>,
Subject: Re: [REGRESSION] 527139d738d7 ("PCI/sysfs: Convert "rom" to static attribute")
Date: Fri, 17 Dec 2021 11:29:28 -0600	[thread overview]
Message-ID: <20211217172928.GA900484@bhelgaas> (raw)
In-Reply-To: <>

Hi Ville,

Thanks for the report!

On Fri, Dec 17, 2021 at 12:44:51PM +0200, Ville Syrjälä wrote:
> Hi,
> The pci sysfs "rom" file has disappeared for VGA devices.
> Looks to be a regression from commit 527139d738d7 ("PCI/sysfs:
> Convert "rom" to static attribute").
> Some kind of ordering issue between the sysfs file creation 
> vs. pci_fixup_video() perhaps?

Can you attach your complete "lspci -vv" output?  Also, which is the
default device?  I think there's a "boot_vga" sysfs file that shows
this.  "find /sys -name boot_vga | xargs grep ."

I think the relevant path is something like this:

                    if (grp->is_visible())
                      pci_dev_rom_attr_is_visible  # after 527139d738d7
                        if (pci_resource_len(pdev, PCI_ROM_RESOURCE))
            if (vga_default_device() ...)
              # update PCI_ROM_RESOURCE
          if (pci_resource_len(pdev, PCI_ROM_RESOURCE))
            sysfs_create_bin_file("rom")           # before 527139d738d7

Prior to 527139d738d7, we ran pci_fixup_video() in
pci_bus_add_devices().  The vga_default_device() there might depend on
the fact that we've discovered all the PCI devices.  

After 527139d738d7, we create the "rom" file in pci_device_add(),
which happens as we discover each device, so maybe we don't yet know
which device is the default VGA device.


  reply	other threads:[~2021-12-17 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 10:44 Ville Syrjälä
2021-12-17 17:29 ` Bjorn Helgaas [this message]
2021-12-17 17:45   ` Ville Syrjälä
2021-12-17 22:49     ` Krzysztof Wilczyński
2022-01-20 13:19       ` Thorsten Leemhuis
2022-01-20 15:00         ` Bjorn Helgaas
2022-01-20 15:05           ` Thorsten Leemhuis
2022-01-22  0:24     ` Bjorn Helgaas
2022-01-25 18:56       ` Ville Syrjälä
2021-12-18  6:10 ` Thorsten Leemhuis

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211217172928.GA900484@bhelgaas \ \ \ \ \ \ \
    --subject='Re: [REGRESSION] 527139d738d7 ("PCI/sysfs: Convert "rom" to static attribute")' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).