Jarod Wilson reports that ExpressCard hotplug doesn't work on HP ZBook G2. The problem turns out to be the ACPI-based "slot detection" code called from pciehp_probe() which uses questionable heuristics based on what ACPI objects are present for the PCIe port device to figure out whether to register a hotplug slot for that port. That code is used if there is at least one PCIe port having an ACPI device configuration object related to hotplug (such as _EJ0 or _RMV), and the Thunderbolt port on the ZBook has _RMV. Of course, Thunderbolt and PCIe native hotplug need not be mutually exclusive (as they aren't on the ZBook), so that rule is simply incorrect. Moreover, the ACPI-based "slot detection" check does not add any value if pciehp_probe() is called at all and the service type of the device object it has been called for is PCIE_PORT_SERVICE_HP, because PCIe hotplug services are only registered if the _OSC handshake in acpi_pci_root_add() allows the kernel to control the PCIe native hotplug feature. No more checks need to be carried out to decide whether or not to register a native PCIe hotlug slot in that case. For the above reasons, make pciehp_probe() check if it has been called for the right service type and drop the pointless ACPI-based "slot detection" check from it. Also remove the entire code whose only user is that check (the entire pciehp_acpi.c file goes away as a result) and drop function headers related to it from the internal pciehp header file. Link: http://lkml.kernel.org/r/1431632038-39917-1-git-send-email-jarod@redhat.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=98581 Reported-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com>
		
			
				
	
	
		
			70 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| #
 | |
| # Makefile for the Linux kernel pci hotplug controller drivers.
 | |
| #
 | |
| 
 | |
| obj-$(CONFIG_HOTPLUG_PCI)		+= pci_hotplug.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_COMPAQ)	+= cpqphp.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_IBM)		+= ibmphp.o
 | |
| 
 | |
| # native drivers should be linked before acpiphp in order to allow the
 | |
| # native driver to attempt to bind first. We can then fall back to
 | |
| # generic support.
 | |
| 
 | |
| obj-$(CONFIG_HOTPLUG_PCI_PCIE)		+= pciehp.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550)	+= cpcihp_zt5550.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC)	+= cpcihp_generic.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_SHPC)		+= shpchp.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_RPA)		+= rpaphp.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR)	+= rpadlpar_io.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_SGI)		+= sgi_hotplug.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_ACPI)		+= acpiphp.o
 | |
| obj-$(CONFIG_HOTPLUG_PCI_S390)		+= s390_pci_hpc.o
 | |
| 
 | |
| # acpiphp_ibm extends acpiphp, so should be linked afterwards.
 | |
| 
 | |
| obj-$(CONFIG_HOTPLUG_PCI_ACPI_IBM)	+= acpiphp_ibm.o
 | |
| 
 | |
| pci_hotplug-objs	:=	pci_hotplug_core.o
 | |
| 
 | |
| ifdef CONFIG_HOTPLUG_PCI_CPCI
 | |
| pci_hotplug-objs	+=	cpci_hotplug_core.o	\
 | |
| 				cpci_hotplug_pci.o
 | |
| endif
 | |
| ifdef CONFIG_ACPI
 | |
| pci_hotplug-objs	+=	acpi_pcihp.o
 | |
| endif
 | |
| 
 | |
| cpqphp-objs		:=	cpqphp_core.o	\
 | |
| 				cpqphp_ctrl.o	\
 | |
| 				cpqphp_sysfs.o	\
 | |
| 				cpqphp_pci.o
 | |
| cpqphp-$(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM) += cpqphp_nvram.o
 | |
| cpqphp-objs += $(cpqphp-y)
 | |
| 
 | |
| ibmphp-objs		:=	ibmphp_core.o	\
 | |
| 				ibmphp_ebda.o	\
 | |
| 				ibmphp_pci.o	\
 | |
| 				ibmphp_res.o	\
 | |
| 				ibmphp_hpc.o
 | |
| 
 | |
| acpiphp-objs		:=	acpiphp_core.o	\
 | |
| 				acpiphp_glue.o
 | |
| 
 | |
| rpaphp-objs		:=	rpaphp_core.o	\
 | |
| 				rpaphp_pci.o	\
 | |
| 				rpaphp_slot.o
 | |
| 
 | |
| rpadlpar_io-objs	:=	rpadlpar_core.o \
 | |
| 				rpadlpar_sysfs.o
 | |
| 
 | |
| pciehp-objs		:=	pciehp_core.o	\
 | |
| 				pciehp_ctrl.o	\
 | |
| 				pciehp_pci.o	\
 | |
| 				pciehp_hpc.o
 | |
| 
 | |
| shpchp-objs		:=	shpchp_core.o	\
 | |
| 				shpchp_ctrl.o	\
 | |
| 				shpchp_pci.o	\
 | |
| 				shpchp_sysfs.o	\
 | |
| 				shpchp_hpc.o
 |