rpms/kernel/devel linux-2.6-defaults-pciehp.patch, NONE, 1.1 linux-2.6-pciehp-update.patch, NONE, 1.1 config-generic, 1.189, 1.190 kernel.spec, 1.1112, 1.1113

Matthew Garrett mjg59 at fedoraproject.org
Mon Nov 3 16:56:31 UTC 2008


Author: mjg59

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5850

Modified Files:
	config-generic kernel.spec 
Added Files:
	linux-2.6-defaults-pciehp.patch linux-2.6-pciehp-update.patch 
Log Message:
- linux-2.6-pciehp-update.patch
  * Update pciehp driver to support autoloading and listening for events
- linux-2.6-defaults-pciehp.patch
  * Enable passive mode by default
- Build acpiphp in statically


linux-2.6-defaults-pciehp.patch:

--- NEW FILE linux-2.6-defaults-pciehp.patch ---
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index e7f3c9e..4f2b037 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -41,7 +41,7 @@ int pciehp_debug;
 int pciehp_poll_mode;
 int pciehp_poll_time;
 int pciehp_force;
-int pciehp_passive;
+int pciehp_passive=1;
 struct workqueue_struct *pciehp_wq;
 
 #define DRIVER_VERSION	"0.4"

linux-2.6-pciehp-update.patch:

--- NEW FILE linux-2.6-pciehp-update.patch ---
diff -ur vanilla-2.6.27/drivers/pci/hotplug/pciehp_core.c vanilla-2.6.27.pcie/drivers/pci/hotplug/pciehp_core.c
--- vanilla-2.6.27/drivers/pci/hotplug/pciehp_core.c	2008-10-09 23:13:53.000000000 +0100
+++ vanilla-2.6.27.pcie/drivers/pci/hotplug/pciehp_core.c	2008-11-03 16:49:43.000000000 +0000
@@ -41,6 +41,7 @@
 int pciehp_poll_mode;
 int pciehp_poll_time;
 int pciehp_force;
+int pciehp_passive;
 struct workqueue_struct *pciehp_wq;
 
 #define DRIVER_VERSION	"0.4"
@@ -55,10 +56,12 @@
 module_param(pciehp_poll_mode, bool, 0644);
 module_param(pciehp_poll_time, int, 0644);
 module_param(pciehp_force, bool, 0644);
+module_param(pciehp_passive, bool, 0644);
 MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not");
 MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not");
 MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds");
 MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing");
+MODULE_PARM_DESC(pciehp_force, "Listen for pciehp events, even if _OSC and OSHP are missing");
 
 #define PCIE_MODULE_NAME "pciehp"
 
@@ -85,6 +88,13 @@
   	.get_cur_bus_speed =	get_cur_bus_speed,
 };
 
+static struct hotplug_slot_ops pciehp_passive_hotplug_slot_ops = {
+	.owner =                THIS_MODULE,
+	.get_adapter_status =   get_adapter_status,
+	.get_max_bus_speed =    get_max_bus_speed,
+	.get_cur_bus_speed =    get_cur_bus_speed,
+};
+
 /*
  * Check the status of the Electro Mechanical Interlock (EMI)
  */
@@ -208,7 +218,11 @@
 		hotplug_slot->name = slot->name;
 		hotplug_slot->private = slot;
 		hotplug_slot->release = &release_slot;
-		hotplug_slot->ops = &pciehp_hotplug_slot_ops;
+		if (pciehp_passive &&
+		    pciehp_get_hp_hw_control_from_firmware(ctrl->pci_dev))
+			hotplug_slot->ops = &pciehp_passive_hotplug_slot_ops;
+		else
+			hotplug_slot->ops = &pciehp_hotplug_slot_ops;
 		get_power_status(hotplug_slot, &info->power_status);
 		get_attention_status(hotplug_slot, &info->attention_status);
 		get_latch_status(hotplug_slot, &info->latch_status);
@@ -401,10 +415,7 @@
 	u8 value;
 	struct pci_dev *pdev = dev->port;
 
-	if (pciehp_force)
-		dbg("Bypassing BIOS check for pciehp use on %s\n",
-		    pci_name(pdev));
-	else if (pciehp_get_hp_hw_control_from_firmware(pdev))
+	if (!pciehp_passive && pciehp_get_hp_hw_control_from_firmware(pdev))
 		goto err_out_none;
 
 	ctrl = pcie_init(dev);
@@ -468,7 +479,7 @@
 static int pciehp_resume (struct pcie_device *dev)
 {
 	printk("%s ENTRY\n", __func__);
-	if (pciehp_force) {
+	if (pciehp_force || pciehp_passive) {
 		struct controller *ctrl = get_service_data(dev);
 		struct slot *t_slot;
 		u8 status;
Only in vanilla-2.6.27.pcie/drivers/pci/hotplug: pciehp_core.c~
diff -ur vanilla-2.6.27/drivers/pci/hotplug/pciehp.h vanilla-2.6.27.pcie/drivers/pci/hotplug/pciehp.h
--- vanilla-2.6.27/drivers/pci/hotplug/pciehp.h	2008-10-09 23:13:53.000000000 +0100
+++ vanilla-2.6.27.pcie/drivers/pci/hotplug/pciehp.h	2008-11-03 16:46:45.000000000 +0000
@@ -206,6 +206,10 @@
 {
 	u32 flags = (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |
 		     OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
+	if (pciehp_force) {
+		dev_info(&dev->dev, "Bypassing BIOS check for pciehp\n");
+		return 0;
+	}
 	return acpi_get_hp_hw_control_from_firmware(dev, flags);
 }
 
Only in vanilla-2.6.27.pcie/drivers/pci/hotplug: pciehp.h~


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- config-generic	24 Oct 2008 01:59:54 -0000	1.189
+++ config-generic	3 Nov 2008 16:56:00 -0000	1.190
@@ -297,7 +297,7 @@
 # CONFIG_PNPBIOS is not set
 
 CONFIG_ACPI_PCI_SLOT=y
-CONFIG_HOTPLUG_PCI_ACPI=m
+CONFIG_HOTPLUG_PCI_ACPI=y
 CONFIG_HOTPLUG_PCI_ACPI_IBM=m
 
 #


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1112
retrieving revision 1.1113
diff -u -r1.1112 -r1.1113
--- kernel.spec	3 Nov 2008 14:23:02 -0000	1.1112
+++ kernel.spec	3 Nov 2008 16:56:00 -0000	1.1113
@@ -613,6 +613,8 @@
 Patch360: linux-2.6-debug-always-inline-kzalloc.patch
 Patch370: linux-2.6-crash-driver.patch
 Patch380: linux-2.6-defaults-pci_no_msi.patch
+Patch381: linux-2.6-pciehp-update.patch
+Patch382: linux-2.6-defaults-pciehp.patch
 Patch390: linux-2.6-defaults-acpi-video.patch
 Patch391: linux-2.6-acpi-video-dos.patch
 Patch392: linux-2.6-acpi-clear-wake-status.patch
@@ -1190,6 +1192,12 @@
 # disable message signaled interrupts
 ApplyPatch linux-2.6-defaults-pci_no_msi.patch
 
+# update the pciehp driver
+ApplyPatch linux-2.6-pciehp-update.patch
+
+# default to enabling passively listening for hotplug events
+ApplyPatch linux-2.6-defaults-pciehp.patch
+
 #
 # SCSI Bits.
 #
@@ -1909,6 +1917,11 @@
   * Adds support for rfkill control of Bluetooth (#437091)
 - linux-2.6-dmi-autoload.patch: backport DMI autoloading from 2.6.28
   * Fixes autoloading of Macbook Pro Nvidia backlight driver (#462409)
+- linux-2.6-pciehp-update.patch
+  * Update pciehp driver to support autoloading and listening for events
+- linux-2.6-defaults-pciehp.patch
+  * Enable passive mode by default
+- Build acpiphp in statically
 
 * Mon Nov 03 2008 Dave Airlie <airlied at redhat.com> 2.6.27.4-73
 - drm-modesetting-radeon.patch: fix modeset reporting for pm-utils




More information about the scm-commits mailing list