summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-20 14:56:46 -0600
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-03-20 14:59:25 -0700
commit83dbf66f04b96e65c6c18436c16d40f9cf8630aa (patch)
tree0c3ffcc7d34aea8cd8983f3863bae67ef7f72029 /Documentation
parent738a6396c223b486304dda778119dbbca563f019 (diff)
downloadlinux-83dbf66f04b96e65c6c18436c16d40f9cf8630aa.tar.gz
linux-83dbf66f04b96e65c6c18436c16d40f9cf8630aa.tar.bz2
linux-83dbf66f04b96e65c6c18436c16d40f9cf8630aa.zip
PCI Hotplug: restore fakephp interface with complete reimplementation
A complete re-implementation of fakephp is necessary if it is to present its former interface (pre-2.6.27, when it broke). The reason is that PCI hotplug drivers call pci_hp_register(), which enforces the rule that only one /sys/bus/pci/slots/ file may be created per physical slot. The change breaks the old fakephp's assumption that it could create a file per function. So we re-implement fakephp to avoid using the standard PCI hotplug API so that we can restore the old fakephp user interface. It puts entries in /sys/bus/pci/slots with the names of all PCI devices/functions, exactly symmetrical to what is shown in /sys/bus/pci/devices. Each slots/ entry has a "power" attribute, which works the same way as the fakephp driver's power attribute has worked. There are a few improvements over old fakephp, which couldn't handle PCI devices being added or removed via a means outside of fakephp's knowledge. If a device was added another way, old fakephp didn't notice and didn't create the fake slot for it. If a device was removed another way, old fakephp didn't delete the fake slot for it (and accessing the stale slot caused an oops). The new implementation overcomes these limitations. As a consequence, removing a bridge with other devices behind it now works as well, which is something else old fakephp couldn't do previously. This duplicates a tiny bit of the code in the PCI core that does this same function. Re-using that code ends up being more complex than duplicating it, and it makes code in the PCI core more ugly just to support this legacy fakephp interface compatibility layer. Reviewed-by: James Cameron <qz@hp.com> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions