Is there a generic way to reset a PCI device in Linux from the command line? That is, cause the PCI bus to issue a reset command.

link|improve this question
feedback

migrated from serverfault.com Jan 23 at 10:30

This question came from our site for system administrators and desktop support professionals.

2 Answers

Since a generic PCI device is not hotpluggable there won't be a way to reset it and have the kernel re-enumerate it.

Whatever kind of problems you are trying to solve, there surely is a better way than to just reset it.

link|improve this answer
I'm simulating a PCI device in QEMU and need to reset it's state as I develop. I wanted to do it from within the guest. – Jonathan Jan 24 at 5:20
feedback

The closest thing the PCI bus has to a device level reset is changing the power state to D3 and back to D0. After unloading the driver ( it would be bad to reset the hardware out from under the driver ), you can use setpci to write to the control registers to change the power state, but I believe this happens automatically when you unload the driver.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.