Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758683AbaLKSLk (ORCPT ); Thu, 11 Dec 2014 13:11:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44690 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbaLKSLi (ORCPT ); Thu, 11 Dec 2014 13:11:38 -0500 Date: Thu, 11 Dec 2014 13:11:36 -0500 From: Greg Kroah-Hartman To: Bjorn Helgaas Cc: Dely Sy , "linux-pci@vger.kernel.org" , Rajat Jain , Guenter Roeck , Jesse Barnes , Kristen Carlson Accardi , "linux-kernel@vger.kernel.org" Subject: Re: Special handling of display/VGA devices in hotplug drivers Message-ID: <20141211181136.GA11367@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 11, 2014 at 10:34:30AM -0700, Bjorn Helgaas wrote: > 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? The PCI spec said that you were not allowed to hotplug VGA drivers. The big issue is that POST usually needs to run on those things, and there is no way to POST a PCI hotplugged device. Does the spec not say that anymore? I haven't looked in years at it... Do you want to hot-add a VGA device? Are these lines causing a problem with something? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/