linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>
Subject: Regression caused by "PCI: Probe for device reset support during enumeration"
Date: Fri, 14 Dec 2018 13:15:58 +0000	[thread overview]
Message-ID: <b859f604-17bc-243c-5d0f-65b02c5cd24d@citrix.com> (raw)

Hi Bjorn,

Your commit 5b0764cac9f1 ("PCI: Probe for device reset support during 
enumeration") moved checking whether a device could be reset much 
earlier to when the device is first probed. When the device is first 
probed, the other devices on the bus may not have been discovered yet. 
This means that we will claim to support SBR as a reset mechanism 
because it is the only device behind the bus at that pointer meanwhile 
the others simply haven't been discovered yet. This results in 
dev->reset_fn being incorrectly set to true and a reset file being 
created. When userspace actually tries to use the reset file it fails 
because now there are other sibling devices preventing the use of an SBR.

How can this best be fixed? I was considering moving the check to the 
end of pci_bus_add_devices(), but I'm not at all familiar with the code 
so perhaps there is a better way.

Thanks,
-- 
Ross Lagerwall

             reply	other threads:[~2018-12-14 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 13:15 Ross Lagerwall [this message]
2018-12-14 17:18 ` Regression caused by "PCI: Probe for device reset support during enumeration" Bjorn Helgaas
2018-12-14 18:40   ` Alex Williamson

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=b859f604-17bc-243c-5d0f-65b02c5cd24d@citrix.com \
    --to=ross.lagerwall@citrix.com \
    --cc=bhelgaas@google.com \
    --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;
as well as URLs for NNTP newsgroup(s).