# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.737   -> 1.738  
#	drivers/hotplug/cpqphp_core.c	1.3     -> 1.4    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/10	Dan.Zink@hp.com	1.738
# [PATCH] Compaq PCI Hotplug bug fix
# 
# Found the bug.  The following patch fixes the hot plug
# driver so that it has a fallback when there are no unused
# IRQs on a system.  At some point intialization got re-
# ordered and this was broken.
# 
# Greg, this should apply to 2.4 and 2.5 if you wouldn't
# mind submitting it.
# 
# Thanks,
# Dan
# --------------------------------------------
#
diff -Nru a/drivers/hotplug/cpqphp_core.c b/drivers/hotplug/cpqphp_core.c
--- a/drivers/hotplug/cpqphp_core.c	Thu Oct 10 14:44:44 2002
+++ b/drivers/hotplug/cpqphp_core.c	Thu Oct 10 14:44:44 2002
@@ -1101,6 +1101,9 @@
 	/*
 	 * Get IO, memory, and IRQ resources for new devices
 	 */
+	// The next line is required for cpqhp_find_available_resources
+	ctrl->interrupt = pdev->irq;
+
 	rc = cpqhp_find_available_resources(ctrl, cpqhp_rom_start);
 	ctrl->add_support = !rc;
 	if (rc) {
@@ -1129,7 +1132,6 @@
 	writel(0xFFFFFFFFL, ctrl->hpc_reg + INT_MASK);
 
 	/* set up the interrupt */
-	ctrl->interrupt = pdev->irq;
 	dbg("HPC interrupt = %d \n", ctrl->interrupt);
 	if (request_irq(ctrl->interrupt,
 			(void (*)(int, void *, struct pt_regs *)) &cpqhp_ctrl_intr,
