LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Closed Thread
  Search this Thread
Old 04-25-2017, 12:47 AM   #1
khhyle
LQ Newbie
 
Registered: Dec 2016
Location: San Jose, California
Distribution: Red Hat (Tikanga)
Posts: 6

Rep: Reputation: Disabled
PCI - Remove/Rescan vs. Rescan


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.

Last edited by khhyle; 04-25-2017 at 12:49 AM.
 
Old 04-28-2017, 08:51 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,607

Rep: Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rescan for monitor bjlockie Linux - Desktop 2 06-05-2016 06:08 AM
FC Luns rescan issue sumit6in Red Hat 2 08-02-2015 12:09 AM
How to rescan bash PATH reakinator Linux - General 7 04-14-2009 03:35 PM
Rescan devices consty Linux - General 1 11-02-2005 05:13 PM
HD SCSI Rescan carma Linux - Hardware 2 03-03-2005 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration