public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Special handling of display/VGA devices in hotplug drivers
@ 2014-12-11 17:34 Bjorn Helgaas
  2014-12-11 18:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2014-12-11 17:34 UTC (permalink / raw)
  To: Dely Sy
  Cc: linux-pci@vger.kernel.org, Rajat Jain, Guenter Roeck,
	Jesse Barnes, Greg Kroah-Hartman, Kristen Carlson Accardi,
	linux-kernel@vger.kernel.org

It looks like you added the initial pciehp driver [1], which includes
the following code in pciehp_disable_slot():

+ if (class_code == PCI_BASE_CLASS_DISPLAY) {
+ /* Display/Video adapter (not supported) */
+ rc = REMOVE_NOT_SUPPORTED;

+ /* If it's a bridge, check the VGA Enable bit */
+ if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
+ rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR);
+ if (rc)
+ return rc;
+
+ /* If the VGA Enable bit is set, remove isn't supported */
+ if (BCR & PCI_BRIDGE_CTL_VGA) {
+ rc = REMOVE_NOT_SUPPORTED;

I'm trying to figure out why VGA devices are handled specially.  I
can't find anything in the PCI specs that mentions this.  Most of the
other PCI hotplug drivers have similar code.  Do you remember anything
about this?

Bjorn


[1] https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/drivers/pci/hotplug/pciehp_ctrl.c?id=c16b4b14d9806e639f4afefa2d651a857a212afe

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

end of thread, other threads:[~2014-12-11 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 17:34 Special handling of display/VGA devices in hotplug drivers Bjorn Helgaas
2014-12-11 18:11 ` Greg Kroah-Hartman
2014-12-11 19:32   ` Jesse Barnes
2014-12-11 19:56     ` Guenter Roeck
2014-12-11 22:07     ` Bjorn Helgaas
2014-12-11 22:57       ` One Thousand Gnomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox