rpms/kernel/F-9 linux-2.6-defaults-pciehp.patch, NONE, 1.1 linux-2.6-pciehp-update.patch, NONE, 1.1 config-generic, 1.121, 1.122 kernel.spec, 1.834, 1.835

Chuck Ebbert cebbert at fedoraproject.org
Mon Nov 3 23:47:18 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7187

Modified Files:
	config-generic kernel.spec 
Added Files:
	linux-2.6-defaults-pciehp.patch linux-2.6-pciehp-update.patch 
Log Message:
Build in acpiphp (ACPI hotplug support.)
Add pcie hotplug passive mode support.
Enable passive mode by default.

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 linux-2.6.27.noarch.p4/drivers/pci/hotplug/pciehp_core.c
--- vanilla-2.6.27/drivers/pci/hotplug/pciehp_core.c	2008-10-09 23:13:53.000000000 +0100
+++ linux-2.6.27.noarch.p4/drivers/pci/hotplug/pciehp_core.c	2008-11-03 18:51:51.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"
@@ -50,15 +51,18 @@
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("acpi*:PNP0A08:*");
 
 module_param(pciehp_debug, bool, 0644);
 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 +89,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 +219,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 +416,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 +480,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;
diff -ur vanilla-2.6.27/drivers/pci/hotplug/pciehp.h linux-2.6.27.noarch.p4/drivers/pci/hotplug/pciehp.h
--- vanilla-2.6.27/drivers/pci/hotplug/pciehp.h	2008-10-09 23:13:53.000000000 +0100
+++ linux-2.6.27.noarch.p4/drivers/pci/hotplug/pciehp.h	2008-11-03 16:53:57.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);
 }
 


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/config-generic,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- config-generic	30 Oct 2008 10:02:44 -0000	1.121
+++ config-generic	3 Nov 2008 23:46:46 -0000	1.122
@@ -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/F-9/kernel.spec,v
retrieving revision 1.834
retrieving revision 1.835
diff -u -r1.834 -r1.835
--- kernel.spec	1 Nov 2008 04:20:12 -0000	1.834
+++ kernel.spec	3 Nov 2008 23:46:46 -0000	1.835
@@ -628,6 +628,8 @@
 Patch340: linux-2.6-debug-vm-would-have-oomkilled.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
 
 Patch392: linux-2.6-acpi-clear-wake-status.patch
 Patch393: linux-2.6-acpi-ignore-reset_reg_sup.patch
@@ -1169,6 +1171,10 @@
 #
 # disable message signaled interrupts
 ApplyPatch linux-2.6-defaults-pci_no_msi.patch
+# add pcie passive mode
+ApplyPatch linux-2.6-pciehp-update.patch
+# enable pcie hotplug passive mode by default
+ApplyPatch linux-2.6-defaults-pciehp.patch
 
 #
 # SCSI Bits.
@@ -1904,7 +1910,12 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
-* Sat Oct 01 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-21
+* Mon Nov 03 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-22
+- Build in acpiphp (ACPI hotplug support.)
+- Add pcie hotplug passive mode support.
+- Enable passive mode by default.
+
+* Sat Nov 01 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-21
 - Fix overflow in libata when using large disks (>=1.5TB)
 
 * Fri Oct 31 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-20




More information about the fedora-extras-commits mailing list