linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI Rescan Question
@ 2017-04-26 22:56 Kyle Gale
  2017-04-27  8:02 ` Lukas Wunner
  2017-04-28 14:56 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: Kyle Gale @ 2017-04-26 22:56 UTC (permalink / raw)
  To: linux-pci

Hi,



Can someone help me understand why I need to remove my stale PCI
device files from the tree if I want to properly get my device
re-initialized after unplugging and reinserting?



For example, I turn on my system with my PCI device plugged in. All is
fine. I unplug it, plug it back in, and rescan (echo 1 >
/sys/bus/pci/devices/rescan) and end up in this state where my BAR0 is
not set, and other things are not entirely correct.



But if I do a remove (echo 1 > /sys/bus/pci/devices/xxxx/xx.x/remove)
of the port, it then properly re-initializes my device when I do a
rescan.



Why does it not suffice to simply do a rescan? Does the rescan skip
some step if it finds that the device is already in the PCI tree? It's
not as if the rescan completely skips the device if I don't do a
remove, it just doesn't do all of the initialization.



Thanks,

Kyle Gale

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-24 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26 22:56 PCI Rescan Question Kyle Gale
2017-04-27  8:02 ` Lukas Wunner
2017-04-28 14:56 ` Bjorn Helgaas
2017-04-29 22:17   ` Yinghai Lu
2017-05-24 20:34     ` Kyle Gale

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