public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BK PATCH] PCI fixes for 2.6.4-rc1
@ 2004-02-28  0:07 Greg KH
  2004-02-28  0:09 ` [PATCH] " Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:07 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel

Hi,

Here are some small PCI and PCI hotplug fixes for 2.6.4-rc1.  With these
patches, the ARM tree should build properly now as well as the shpc
driver will not oops.

I _really_ wanted to get the PCI Express support in with this set of
patches, but the patch in the -mm tree breaks any box that is in the
ACPI quirks table.  Then the patches that tried to fix that problem
broke all of my boxes (ones without PCI Express and with PCI Express.)
So the PCI Express code is not stable enough yet for mainline,
unfortunately :(

Good news is I now have hardware to test on, so PCI Express support has
a chance to make it into the tree (thanks a lot to Intel for this...)

Please pull from:
	bk://kernel.bkbits.net/gregkh/linux/pci-2.6

thanks,

greg k-h

p.s. I'll send these as patches in response to this email to lkml for
those who want to see them.


 drivers/pci/hotplug/Kconfig       |    4 +--
 drivers/pci/hotplug/Makefile      |   37 ++++++++++------------------
 drivers/pci/hotplug/pciehp_ctrl.c |    2 +
 drivers/pci/hotplug/rpaphp.h      |    2 -
 drivers/pci/hotplug/rpaphp_core.c |    4 ---
 drivers/pci/hotplug/shpchp.h      |    4 +--
 drivers/pci/hotplug/shpchp_ctrl.c |    2 +
 drivers/pci/hotplug/shpchp_hpc.c  |   49 ++++++++++++++++++++++----------------
 drivers/pci/pci.c                 |    5 ---
 drivers/pci/probe.c               |    4 +++
 drivers/pci/setup-bus.c           |   22 +++++++----------
 drivers/pci/setup-res.c           |    5 ++-
 include/linux/pci.h               |    2 +
 13 files changed, 71 insertions(+), 71 deletions(-)
-----

<lxiep:ltcfwd.linux.ibm.com>:
  o PCI Hotplug: fix rpaphp bugs

<rmk-pci:arm.linux.org.uk>:
  o PCI: Introduce bus->bridge_ctl member
  o PCI: Don't report pci_request_regions() failure twice
  o PCI: Report meaningful error for failed resource allocation

Dely Sy:
  o PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working

Greg Kroah-Hartman:
  o PCI Hotplug: clean up the Makefile a bit more
  o PCI Hotplug: remove unneeded ACPI Makefile rules


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:07 [BK PATCH] PCI fixes for 2.6.4-rc1 Greg KH
@ 2004-02-28  0:09 ` Greg KH
  2004-02-28  0:09   ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1613, 2004/02/24 11:07:29-08:00, rmk-pci@arm.linux.org.uk

[PATCH] PCI: Report meaningful error for failed resource allocation

pci_assign_resource reports odd messages when resource allocation fails.
This is because res->end and res->start are modified by allocate_resource.
For example:

PCI: Failed to allocate resource 1(0-ffffffff) for 0000:00:01.0

The following patch reports whether it's an IO or memory resource, and
includes the correct size.  For consistency, we report it in a similar
way to the failure message in pci_request_region(), even though
res->start is unlikely to be useful.


 drivers/pci/setup-res.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff -Nru a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c	Fri Feb 27 15:57:35 2004
+++ b/drivers/pci/setup-res.c	Fri Feb 27 15:57:35 2004
@@ -143,8 +143,9 @@
 	}
 
 	if (ret) {
-		printk(KERN_ERR "PCI: Failed to allocate resource %d(%lx-%lx) for %s\n",
-		       resno, res->start, res->end, pci_name(dev));
+		printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n",
+		       res->flags & IORESOURCE_IO ? "I/O" : "mem",
+		       resno, size, res->start, pci_name(dev));
 	} else if (resno < PCI_BRIDGE_RESOURCES) {
 		pci_update_resource(dev, res, resno);
 	}


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09 ` [PATCH] " Greg KH
@ 2004-02-28  0:09   ` Greg KH
  2004-02-28  0:09     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1614, 2004/02/24 11:07:43-08:00, rmk-pci@arm.linux.org.uk

[PATCH] PCI: Don't report pci_request_regions() failure twice

pci_request_regions() reports an error when pci_request_region() fails.
However, since pci_request_region() already reports an error on failure,
pci_request_regions() has some unwanted duplication.


 drivers/pci/pci.c |    5 -----
 1 files changed, 5 deletions(-)


diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c	Fri Feb 27 15:57:30 2004
+++ b/drivers/pci/pci.c	Fri Feb 27 15:57:30 2004
@@ -535,11 +535,6 @@
 	return 0;
 
 err_out:
-	printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n",
-		pci_resource_flags(pdev, i) & IORESOURCE_IO ? "I/O" : "mem",
-		i + 1, /* PCI BAR # */
-		pci_resource_len(pdev, i), pci_resource_start(pdev, i),
-		pci_name(pdev));
 	while(--i >= 0)
 		pci_release_region(pdev, i);
 		


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09         ` Greg KH
@ 2004-02-28  0:09           ` Greg KH
  2004-02-28  0:09             ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1618, 2004/02/24 14:02:08-08:00, greg@kroah.com

PCI Hotplug: remove unneeded ACPI Makefile rules.


 drivers/pci/hotplug/Makefile |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)


diff -Nru a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile
--- a/drivers/pci/hotplug/Makefile	Fri Feb 27 15:57:13 2004
+++ b/drivers/pci/hotplug/Makefile	Fri Feb 27 15:57:13 2004
@@ -55,13 +55,6 @@
 				shpchp_sysfs.o	\
 				shpchp_hpc.o
 
-ifdef CONFIG_HOTPLUG_PCI_ACPI
-  EXTRA_CFLAGS  += -D_LINUX -I$(TOPDIR)/drivers/acpi
-  ifdef CONFIG_ACPI_DEBUG
-    EXTRA_CFLAGS += -DACPI_DEBUG_OUTPUT
-  endif
-endif
-
 ifeq ($(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM),y)
 	cpqphp-objs += cpqphp_nvram.o
 endif
@@ -70,16 +63,14 @@
   pciehp-objs += pciehprm_nonacpi.o
 else
   pciehp-objs += pciehprm_acpi.o
-  EXTRA_CFLAGS  += -D_LINUX -I$(TOPDIR)/drivers/acpi -I$(TOPDIR)/drivers/acpi/include 
 endif
 
 ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_LEGACY),y)
   shpchp-objs += shpchprm_legacy.o
 else
-   ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_NONACPI),y)
-     shpchp-objs += shpchprm_nonacpi.o
-   else
-      shpchp-objs += shpchprm_acpi.o
-      EXTRA_CFLAGS  += -D_LINUX -I$(TOPDIR)/drivers/acpi 
-   endif
+  ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_NONACPI),y)
+    shpchp-objs += shpchprm_nonacpi.o
+  else
+    shpchp-objs += shpchprm_acpi.o
+  endif
 endif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09     ` Greg KH
@ 2004-02-28  0:09       ` Greg KH
  2004-02-28  0:09         ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1616, 2004/02/24 11:08:13-08:00, lxiep@ltcfwd.linux.ibm.com

[PATCH] PCI Hotplug: fix rpaphp bugs

The attached patch has a fix for the conflict between  fakephp and
rpaphp so that fakephp and rpaphp can't be built into the kernel at the
same time and a couple of  problems I missed in my previous patch.
(Sorry about that).


 drivers/pci/hotplug/Kconfig       |    2 +-
 drivers/pci/hotplug/rpaphp.h      |    2 +-
 drivers/pci/hotplug/rpaphp_core.c |    4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)


diff -Nru a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
--- a/drivers/pci/hotplug/Kconfig	Fri Feb 27 15:57:21 2004
+++ b/drivers/pci/hotplug/Kconfig	Fri Feb 27 15:57:21 2004
@@ -191,7 +191,7 @@
 
 config HOTPLUG_PCI_RPA
 	tristate "RPA PCI Hotplug driver"
-	depends on HOTPLUG_PCI && PPC_PSERIES && PPC64
+	depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 && !HOTPLUG_PCI_FAKE
 	help
 	  Say Y here if you have a a RPA system that supports PCI Hotplug.
 
diff -Nru a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
--- a/drivers/pci/hotplug/rpaphp.h	Fri Feb 27 15:57:21 2004
+++ b/drivers/pci/hotplug/rpaphp.h	Fri Feb 27 15:57:21 2004
@@ -54,7 +54,7 @@
 
 #define dbg(format, arg...)					\
 	do {							\
-		if (rpaphp_debug)				\
+		if (debug)					\
 			printk(KERN_DEBUG "%s: " format,	\
 				MY_NAME , ## arg); 		\
 	} while (0)
diff -Nru a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
--- a/drivers/pci/hotplug/rpaphp_core.c	Fri Feb 27 15:57:21 2004
+++ b/drivers/pci/hotplug/rpaphp_core.c	Fri Feb 27 15:57:21 2004
@@ -39,7 +39,7 @@
 #include "pci_hotplug.h"
 
 
-static int debug = 1;
+static int debug;
 static struct semaphore rpaphp_sem;
 static LIST_HEAD (rpaphp_slot_head);
 static int num_slots;
@@ -837,8 +837,6 @@
 	int retval = 0;
 
 	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
-
-	rpaphp_debug = debug;
 
 	/* read all the PRA info from the system */
 	retval = init_rpa();


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09       ` Greg KH
@ 2004-02-28  0:09         ` Greg KH
  2004-02-28  0:09           ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1617, 2004/02/24 11:08:29-08:00, dlsy@snoqualmie.dp.intel.com

[PATCH] PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working

Here is the patch to get polling mode in SHPC hot-plug properly
working.


 drivers/pci/hotplug/pciehp_ctrl.c |    2 +
 drivers/pci/hotplug/shpchp.h      |    4 +--
 drivers/pci/hotplug/shpchp_ctrl.c |    2 +
 drivers/pci/hotplug/shpchp_hpc.c  |   49 ++++++++++++++++++++++----------------
 4 files changed, 35 insertions(+), 22 deletions(-)


diff -Nru a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
--- a/drivers/pci/hotplug/pciehp_ctrl.c	Fri Feb 27 15:57:17 2004
+++ b/drivers/pci/hotplug/pciehp_ctrl.c	Fri Feb 27 15:57:17 2004
@@ -188,11 +188,13 @@
 		/*
 		 * Card Present
 		 */
+		info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		taskInfo->event_type = INT_PRESENCE_ON;
 	} else {
 		/*
 		 * Not Present
 		 */
+		info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		taskInfo->event_type = INT_PRESENCE_OFF;
 	}
 
diff -Nru a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
--- a/drivers/pci/hotplug/shpchp.h	Fri Feb 27 15:57:17 2004
+++ b/drivers/pci/hotplug/shpchp.h	Fri Feb 27 15:57:17 2004
@@ -390,8 +390,8 @@
 		/* Sleep for up to 1 second */
 		schedule_timeout(1*HZ);
 	} else {
-		/* Sleep for up to 1.5 second */
-		schedule_timeout(1.5*HZ);
+		/* Sleep for up to 2 seconds */
+		schedule_timeout(2*HZ);
 	}
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&ctrl->queue, &wait);
diff -Nru a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
--- a/drivers/pci/hotplug/shpchp_ctrl.c	Fri Feb 27 15:57:17 2004
+++ b/drivers/pci/hotplug/shpchp_ctrl.c	Fri Feb 27 15:57:17 2004
@@ -192,11 +192,13 @@
 		/*
 		 * Card Present
 		 */
+		info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		taskInfo->event_type = INT_PRESENCE_ON;
 	} else {
 		/*
 		 * Not Present
 		 */
+		info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		taskInfo->event_type = INT_PRESENCE_OFF;
 	}
 
diff -Nru a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
--- a/drivers/pci/hotplug/shpchp_hpc.c	Fri Feb 27 15:57:17 2004
+++ b/drivers/pci/hotplug/shpchp_hpc.c	Fri Feb 27 15:57:17 2004
@@ -1071,9 +1071,14 @@
 	if (!shpchp_poll_mode) { 
 		ctrl = (struct controller *)dev_id;
 		php_ctlr = ctrl->hpc_ctlr_handle;
-	} else 
+	} else { 
 		php_ctlr = (struct php_ctlr_state_s *) dev_id;
+		ctrl = (struct controller *)php_ctlr->callback_instance_id;
+	}
 
+	if (!ctrl)
+		return IRQ_NONE;
+	
 	if (!php_ctlr || !php_ctlr->creg)
 		return IRQ_NONE;
 
@@ -1085,18 +1090,20 @@
 	dbg("%s: shpc_isr proceeds\n", __FUNCTION__);
 	dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); 
 
-	/* Mask Global Interrupt Mask - see implementation note on p. 139 */
-	/* of SHPC spec rev 1.0*/
-	temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);
-	dbg("%s: Before masking global interrupt, temp_dword = %x\n",
-		__FUNCTION__, temp_dword); 
-	temp_dword |= 0x00000001;
-	dbg("%s: After masking global interrupt, temp_dword = %x\n",
-		__FUNCTION__, temp_dword); 
-	writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);
+	if(!shpchp_poll_mode) {
+		/* Mask Global Interrupt Mask - see implementation note on p. 139 */
+		/* of SHPC spec rev 1.0*/
+		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);
+		dbg("%s: Before masking global interrupt, temp_dword = %x\n",
+			__FUNCTION__, temp_dword); 
+		temp_dword |= 0x00000001;
+		dbg("%s: After masking global interrupt, temp_dword = %x\n",
+			__FUNCTION__, temp_dword); 
+		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);
 
-	intr_loc2 = readl(php_ctlr->creg + INTR_LOC);  
-	dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 
+		intr_loc2 = readl(php_ctlr->creg + INTR_LOC);  
+		dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 
+	}
 
 	if (intr_loc & 0x0001) {
 		/* 
@@ -1159,14 +1166,16 @@
 			dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 
 		}
 	}
-	/* Unmask Global Interrupt Mask */
-	temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);
-	dbg("%s: 2-Before unmasking global interrupt, temp_dword = %x\n",
-		__FUNCTION__, temp_dword); 
-	temp_dword &= 0xfffffffe;
-	dbg("%s: 2-After unmasking global interrupt, temp_dword = %x\n",
-		__FUNCTION__, temp_dword); 
-	writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);
+	if (!shpchp_poll_mode) {
+		/* Unmask Global Interrupt Mask */
+		temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);
+		dbg("%s: 2-Before unmasking global interrupt, temp_dword = %x\n",
+			__FUNCTION__, temp_dword); 
+		temp_dword &= 0xfffffffe;
+		dbg("%s: 2-After unmasking global interrupt, temp_dword = %x\n",
+			__FUNCTION__, temp_dword); 
+		writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);
+	}
 	
 	return IRQ_HANDLED;
 }


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09   ` Greg KH
@ 2004-02-28  0:09     ` Greg KH
  2004-02-28  0:09       ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1615, 2004/02/24 11:07:59-08:00, rmk-pci@arm.linux.org.uk

[PATCH] PCI: Introduce bus->bridge_ctl member

GregKH mentioned confirmed that people have been waiting for this patch.
Appologies, it had completely evaporated from my mind.

This patch introduces the "bridge_ctl" member of pci_bus, which allows
architectures to tweak the bridge control register (eg, for setting
fast back to back modes etc) in pcibios_fixup_bus().

Please note, though, that the value is only written back if
pci_setup_bridge() is called.  This will be called if an architecture
is using the generic PCI bus setup functionality in setup-bus.c.
If an architecture doesn't, then it is the responsibility of the
architecture to write this value to the bridge as appropriate.

(That said, the bridge control register is only ever changed if an
architecture is using setup-bus.c anyway, so there should be no
overall functional change.)


 drivers/pci/probe.c     |    4 ++++
 drivers/pci/setup-bus.c |   22 ++++++++++------------
 include/linux/pci.h     |    2 ++
 3 files changed, 16 insertions(+), 12 deletions(-)


diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c	Fri Feb 27 15:57:26 2004
+++ b/drivers/pci/probe.c	Fri Feb 27 15:57:26 2004
@@ -366,6 +366,8 @@
 		child = pci_alloc_child_bus(bus, dev, busnr);
 		child->primary = buses & 0xFF;
 		child->subordinate = (buses >> 16) & 0xFF;
+		child->bridge_ctl = bctl;
+
 		cmax = pci_scan_child_bus(child);
 		if (cmax > max) max = cmax;
 	} else {
@@ -400,6 +402,8 @@
 		pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses);
 
 		if (!is_cardbus) {
+			child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA;
+
 			/* Now we can scan all subordinate buses... */
 			max = pci_scan_child_bus(child);
 		} else {
diff -Nru a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
--- a/drivers/pci/setup-bus.c	Fri Feb 27 15:57:26 2004
+++ b/drivers/pci/setup-bus.c	Fri Feb 27 15:57:26 2004
@@ -43,13 +43,15 @@
 #define CARDBUS_IO_SIZE		(4096)
 #define CARDBUS_MEM_SIZE	(32*1024*1024)
 
-static int __devinit
+static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)
 {
 	struct pci_dev *dev;
 	struct resource *res;
 	struct resource_list head, *list, *tmp;
-	int idx, found_vga = 0;
+	int idx;
+
+	bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA;
 
 	head.next = NULL;
 	list_for_each_entry(dev, &bus->devices, bus_list) {
@@ -57,7 +59,7 @@
 
 		if (class == PCI_CLASS_DISPLAY_VGA
 				|| class == PCI_CLASS_NOT_DEFINED_VGA)
-			found_vga = 1;
+			bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
 
 		pdev_sort_resources(dev, &head);
 	}
@@ -70,8 +72,6 @@
 		list = list->next;
 		kfree(tmp);
 	}
-
-	return found_vga;
 }
 
 static void __devinit
@@ -211,10 +211,7 @@
 	/* Clear out the upper 32 bits of PREF base. */
 	pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0);
 
-	/* Check if we have VGA behind the bridge.
-	   Enable ISA in either case (FIXME!). */
-	l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04;
-	pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, l);
+	pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl);
 }
 
 /* Check whether the bridge supports optional I/O and
@@ -498,13 +495,14 @@
 pci_bus_assign_resources(struct pci_bus *bus)
 {
 	struct pci_bus *b;
-	int found_vga = pbus_assign_resources_sorted(bus);
 	struct pci_dev *dev;
 
-	if (found_vga) {
+	pbus_assign_resources_sorted(bus);
+
+	if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) {
 		/* Propagate presence of the VGA to upstream bridges */
 		for (b = bus; b->parent; b = b->parent) {
-			b->resource[0]->flags |= IORESOURCE_BUS_HAS_VGA;
+			b->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
 		}
 	}
 	list_for_each_entry(dev, &bus->devices, bus_list) {
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	Fri Feb 27 15:57:26 2004
+++ b/include/linux/pci.h	Fri Feb 27 15:57:26 2004
@@ -468,6 +468,8 @@
 
 	char		name[48];
 
+	unsigned short  bridge_ctl;	/* manage NO_ISA/FBB/et al behaviors */
+	unsigned short  pad2;
 	struct device		*bridge;
 	struct class_device	class_dev;
 };


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] PCI fixes for 2.6.4-rc1
  2004-02-28  0:09           ` Greg KH
@ 2004-02-28  0:09             ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2004-02-28  0:09 UTC (permalink / raw)
  To: linux-kernel

ChangeSet 1.1619, 2004/02/24 14:04:40-08:00, greg@kroah.com

PCI Hotplug: clean up the Makefile a bit more.

Still need to fix up the pcie and shpc options to be saner for distros to use.


 drivers/pci/hotplug/Makefile |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)


diff -Nru a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile
--- a/drivers/pci/hotplug/Makefile	Fri Feb 27 15:57:08 2004
+++ b/drivers/pci/hotplug/Makefile	Fri Feb 27 15:57:08 2004
@@ -25,6 +25,8 @@
 				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	\
@@ -49,21 +51,17 @@
 				pciehp_sysfs.o	\
 				pciehp_hpc.o
 
-shpchp-objs		:=	shpchp_core.o	\
-				shpchp_ctrl.o	\
-				shpchp_pci.o	\
-				shpchp_sysfs.o	\
-				shpchp_hpc.o
-
-ifeq ($(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM),y)
-	cpqphp-objs += cpqphp_nvram.o
-endif
-
 ifeq ($(CONFIG_HOTPLUG_PCI_PCIE_PHPRM_NONACPI),y)
   pciehp-objs += pciehprm_nonacpi.o
 else
   pciehp-objs += pciehprm_acpi.o
 endif
+
+shpchp-objs		:=	shpchp_core.o	\
+				shpchp_ctrl.o	\
+				shpchp_pci.o	\
+				shpchp_sysfs.o	\
+				shpchp_hpc.o
 
 ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_LEGACY),y)
   shpchp-objs += shpchprm_legacy.o


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-02-28  0:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-28  0:07 [BK PATCH] PCI fixes for 2.6.4-rc1 Greg KH
2004-02-28  0:09 ` [PATCH] " Greg KH
2004-02-28  0:09   ` Greg KH
2004-02-28  0:09     ` Greg KH
2004-02-28  0:09       ` Greg KH
2004-02-28  0:09         ` Greg KH
2004-02-28  0:09           ` Greg KH
2004-02-28  0:09             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox