PCI hotplug changes for 2.5.46
Subsystems (5)
PATCH 1/1 PCI hotplug changes for 2.5.46
Here are some PCI hotplug driver updates for 2.5.46. A lot of files are touched, as some __init pci functions have been fixed to be __devinit, as the pci hotplug drivers now use them. Almost all of this work was done by Scott Murray, who has also added some new cPCI Hotplug drivers.
There is still a warning from the driver core when a pci card is removed, and I'm working on fixing that up.
Please pull from: bk://linuxusb.bkbits.net/pci_hp-2.5
thanks,
greg k-h
CREDITS | 11 MAINTAINERS | 42 + arch/alpha/kernel/pci.c | 16 arch/i386/pci/common.c | 5 arch/i386/pci/fixup.c | 4 arch/mips/ddb5074/pci.c | 4 arch/mips/ddb5476/pci.c | 4 arch/mips64/sgi-ip27/ip27-pci.c | 2 arch/mips64/sgi-ip32/ip32-pci.c | 4 arch/parisc/kernel/pci.c | 2 arch/ppc/kernel/pci.c | 2 arch/ppc64/kernel/pci.c | 4 arch/sh/kernel/pci-dc.c | 2 arch/sh/kernel/pci-sh7751.c | 4 arch/sh/kernel/pci_st40.c | 2 arch/sparc64/kernel/pci.c | 4 drivers/hotplug/Kconfig | 43 + drivers/hotplug/Makefile | 8 drivers/hotplug/acpiphp.h | 8 drivers/hotplug/acpiphp_core.c | 163 +++--- drivers/hotplug/acpiphp_glue.c | 187 +++---- drivers/hotplug/acpiphp_pci.c | 65 +- drivers/hotplug/acpiphp_res.c | 48 - drivers/hotplug/cpci_hotplug.h | 100 +++ drivers/hotplug/cpci_hotplug_core.c | 927 ++++++++++++++++++++++++++++++++++++ drivers/hotplug/cpci_hotplug_pci.c | 685 ++++++++++++++++++++++++++ drivers/hotplug/cpcihp_generic.c | 292 +++++++++++ drivers/hotplug/cpcihp_zt5550.c | 306 +++++++++++ drivers/hotplug/cpcihp_zt5550.h | 79 +++ drivers/hotplug/pci_hotplug.h | 4 drivers/hotplug/pci_hotplug_util.c | 75 ++ drivers/pci/Makefile | 7 drivers/pci/hotplug.c | 3 drivers/pci/pci.c | 98 +++ drivers/pci/probe.c | 6 drivers/pci/quirks.c | 50 - drivers/pci/search.c | 40 + drivers/pci/setup-bus.c | 17 include/linux/pci.h | 13 include/linux/pci_ids.h | 3 40 files changed, 3031 insertions(+), 308 deletions(-)
-----
[email protected], 2002-11-05 16:21:21-08:00, [email protected]
Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5 into kroah.com:/home/greg/linux/BK/pci_hp-2.5
MAINTAINERS | 21 +++++++++++++++++++++ arch/alpha/kernel/pci.c | 14 ++++++++++++++ drivers/pci/pci.c | 5 +++++ include/linux/pci.h | 6 ++++++ 4 files changed, 46 insertions(+)
------
[email protected], 2002-11-03 00:08:36-08:00, [email protected]
[PATCH] ACPI PCI hotplug updates
These are updates of the acpiphp driver for 2.5.
- change debug flag from 'acpiphp_debug' to 'debug' for insmod
- whitespace cleanup
- message cleanup
drivers/hotplug/acpiphp.h | 8 - drivers/hotplug/acpiphp_core.c | 163 ++++++++++++++++++----------------- drivers/hotplug/acpiphp_glue.c | 187 +++++++++++++++++++---------------------- drivers/hotplug/acpiphp_pci.c | 65 +++++++------- drivers/hotplug/acpiphp_res.c | 48 +++++----- 5 files changed, 234 insertions(+), 237 deletions(-)
------
[email protected], 2002-11-03 00:02:17-08:00, [email protected]
[PATCH] Patch: 2.5.45 PCI Fixups for PCI HotPlug
The following patch changes function scopes only but fixes kernel dump on Hot-Add of PCI bridge cards.
arch/i386/pci/fixup.c | 4 ++-- drivers/pci/quirks.c | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 27 insertions(+), 27 deletions(-)
------
[email protected], 2002-11-02 23:43:53-08:00, [email protected]
[PATCH] PCI Hotplug: fix compiler warning.
drivers/hotplug/pci_hotplug_util.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
------
[email protected], 2002-11-02 23:40:07-08:00, [email protected]
[PATCH] PCI Hotplug: removed a compiler warning of a unused variable in the cpcihp_generic driver.
drivers/hotplug/cpcihp_generic.c | 1 - 1 files changed, 1 deletion(-)
------
[email protected], 2002-11-02 23:14:54-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 4/4
This is a patch 4 of 4 of my CompactPCI hotplug core and drivers, consisting of the generic port I/O cPCI hotplug driver.
Let me know if the kernel parameter parsing code that's #ifndef MODULE is objectionable. I spent quite a while today testing it, it seems reasonably robust. Without it, this driver would only be useable as a module, which I've not figured out how to do with the new kernel configuration stuff.
CREDITS | 2 MAINTAINERS | 7 drivers/hotplug/Kconfig | 15 ++ drivers/hotplug/Makefile | 1 drivers/hotplug/cpcihp_generic.c | 291 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 315 insertions(+), 1 deletion(-)
------
[email protected], 2002-11-02 23:07:09-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 3/4
This is patch 3 of 4 of my CompactPCI hotplug core and drivers, consisting of the Ziatech ZT5550 hotplug driver.
The hardware banging code in this driver started its life in the PICMG 2.12 driver code that MontaVista released at the end of 2001.
CREDITS | 1 MAINTAINERS | 7 drivers/hotplug/Kconfig | 14 + drivers/hotplug/Makefile | 1 drivers/hotplug/cpcihp_zt5550.c | 306 ++++++++++++++++++++++++++++++++++++++++ drivers/hotplug/cpcihp_zt5550.h | 79 ++++++++++ include/linux/pci_ids.h | 3 7 files changed, 411 insertions(+)
------
[email protected], 2002-11-02 22:57:45-08:00, [email protected]
PCI: move EXPORT_SYMBOL for the pbus functions to the setup-bus.c file.
This fixes a linking error if setup-bus.c isn't compiled into the kernel.
drivers/pci/Makefile | 2 +- drivers/pci/pci.c | 2 -- drivers/pci/setup-bus.c | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-)
------
[email protected], 2002-11-02 22:36:38-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 1/4
This is a patch 1 of 4 of my CompactPCI hotplug core and drivers, consisting of the required core PCI changes.
The various arch file changes are to change pcibios_fixup_pbus_ranges to from __init to __devinit, so that pci_setup_bridge can be safely exported from drivers/pci/setup-bus.c.
arch/alpha/kernel/pci.c | 2 arch/i386/pci/common.c | 5 ++ arch/mips/ddb5074/pci.c | 4 - arch/mips/ddb5476/pci.c | 4 - arch/mips64/sgi-ip27/ip27-pci.c | 2 arch/mips64/sgi-ip32/ip32-pci.c | 4 - arch/parisc/kernel/pci.c | 2 arch/ppc/kernel/pci.c | 2 arch/ppc64/kernel/pci.c | 4 - arch/sh/kernel/pci-dc.c | 2 arch/sh/kernel/pci-sh7751.c | 4 - arch/sh/kernel/pci_st40.c | 2 arch/sparc64/kernel/pci.c | 4 - drivers/pci/pci.c | 91 ++++++++++++++++++++++++++++++++++++++++ drivers/pci/probe.c | 3 - drivers/pci/search.c | 40 +++++++++++++++++ drivers/pci/setup-bus.c | 14 +++--- include/linux/pci.h | 7 +++ 18 files changed, 170 insertions(+), 26 deletions(-)
------
[email protected], 2002-11-02 22:25:32-08:00, [email protected]
[PATCH] PCI hotplug comment fixes
Fix comments about /sbin/hotplug; pci_insert_device does not call /sbin/hotplug.
drivers/pci/hotplug.c | 3 +-- drivers/pci/probe.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
------
ChangeSet 1.875.1.1, 2002/11/02 22:25:32-08:00, [email protected]
[PATCH] PCI hotplug comment fixes
Fix comments about /sbin/hotplug; pci_insert_device does not call /sbin/hotplug.
drivers/pci/hotplug.c +1 -2
@@ -71,8 +71,7 @@* @bus: where to insert it * * Link the device to both the global PCI device chain and the -* per-bus list of devices, add the /proc entry, and notify -* userspace (/sbin/hotplug). +* per-bus list of devices, add the /proc entry. */ void pci_insert_device (struct pci_dev *dev,struct pci_bus *bus)
drivers/pci/probe.c +1 -2
@@ -480,8 +480,7 @@/* * Link the device to both the global PCI device chain and -* the per-bus list of devices and call /sbin/hotplug if we -* should. +* the per-bus list of devices and add the /proc entry. */ pci_insert_device (dev, bus);
ChangeSet 1.875.1.2, 2002/11/02 22:36:38-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 1/4
This is a patch 1 of 4 of my CompactPCI hotplug core and drivers, consisting of the required core PCI changes.
The various arch file changes are to change pcibios_fixup_pbus_ranges to from __init to __devinit, so that pci_setup_bridge can be safely exported from drivers/pci/setup-bus.c.
arch/alpha/kernel/pci.c +1 -1
@@ -326,7 +326,7 @@return PCI_SLOT (dev->devfn); } -void __init +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus * bus,struct pbus_set_ranges_data * ranges) {
arch/i386/pci/common.c +5 -0
@@ -90,6 +90,11 @@ } } +void __devinit +pcibios_fixup_pbus_ranges (struct pci_bus *bus,struct pbus_set_ranges_data *ranges) +{ +} +/* * Called after each bus is probed, but before its children * are examined.
arch/mips/ddb5074/pci.c +2 -2
@@ -297,8 +297,8 @@pci_write_config_byte (dev,PCI_INTERRUPT_LINE , irq); } -void __init pcibios_fixup_pbus_ranges (struct pci_bus *bus, -struct pbus_set_ranges_data *ranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *bus, +struct pbus_set_ranges_data *ranges) { }
arch/mips/ddb5476/pci.c +2 -2
@@ -341,8 +341,8 @@pci_write_config_byte (dev,PCI_INTERRUPT_LINE , irq); } -void __init pcibios_fixup_pbus_ranges (struct pci_bus *bus, -struct pbus_set_ranges_data *ranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *bus, +struct pbus_set_ranges_data *ranges) {/* * our caller figure out range by going through the dev structures.
arch/mips64/sgi-ip27/ip27-pci.c +1 -1
@@ -234,7 +234,7 @@pci_fixup_irqs (pci_swizzle, pci_map_irq); } -void __init +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus * bus,struct pbus_set_ranges_data * ranges) {
arch/mips64/sgi-ip32/ip32-pci.c +2 -2
@@ -349,8 +349,8 @@ }/* XXX anybody know what this is supposed to do? */ -void __init pcibios_fixup_pbus_ranges (struct pci_bus * bus, -struct pbus_set_ranges_data * ranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus * bus, +struct pbus_set_ranges_data * ranges) { }
arch/parisc/kernel/pci.c +1 -1
@@ -345,7 +345,7 @@/* ** called by drivers/pci/setup-res.c:pci_setup_bridge(). */ -void pcibios_fixup_pbus_ranges ( +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *bus,struct pbus_set_ranges_data *ranges )
arch/ppc/kernel/pci.c +1 -1
@@ -1107,7 +1107,7 @@return PCI_SLOT (dev->devfn); } -void __init +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus * bus,struct pbus_set_ranges_data * ranges) { }
arch/ppc64/kernel/pci.c +2 -2
@@ -121,8 +121,8 @@ } -void pcibios_fixup_pbus_ranges (struct pci_bus *pbus, -struct pbus_set_ranges_data *pranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *pbus, +struct pbus_set_ranges_data *pranges) { }
arch/sh/kernel/pci-dc.c +1 -1
@@ -113,7 +113,7 @@ } -void __init pcibios_fixup_pbus_ranges (struct pci_bus *bus,struct pbus_set_ranges_data *ranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *bus,struct pbus_set_ranges_data *ranges) { }
arch/sh/kernel/pci-sh7751.c +2 -2
@@ -250,8 +250,8 @@ { 0 } }; -void __init pcibios_fixup_pbus_ranges (struct pci_bus *b, -struct pbus_set_ranges_data *range) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *b, +struct pbus_set_ranges_data *range) {/* No fixups needed */ }
arch/sh/kernel/pci_st40.c +1 -1
@@ -380,7 +380,7 @@ } -void __init +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *bus,struct pbus_set_ranges_data *ranges) {
arch/sparc64/kernel/pci.c +2 -2
@@ -479,8 +479,8 @@ { } -void pcibios_fixup_pbus_ranges (struct pci_bus *pbus, -struct pbus_set_ranges_data *pranges) +void __devinit pcibios_fixup_pbus_ranges (struct pci_bus *pbus, +struct pbus_set_ranges_data *pranges) { }
drivers/pci/pci.c +91 -0
116 lines not on this page · raw message
drivers/pci/probe.c +2 -1
@@ -254,7 +254,7 @@* them, we proceed to assigning numbers to the remaining buses in * order to avoid overlaps between old and new bus numbers. */ -static int __devinit pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) +int __devinit pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) {unsigned int buses;unsigned short cr;
@@ -595,4 +595,5 @@EXPORT_SYMBOL (pci_do_scan_bus);EXPORT_SYMBOL (pci_scan_slot);EXPORT_SYMBOL (pci_scan_bus); +EXPORT_SYMBOL (pci_scan_bridge);#endif
drivers/pci/search.c +40 -0
@@ -1,6 +1,45 @@#include <linux/pci.h> #include <linux/module.h> +static struct pci_bus * +pci_do_find_bus (struct pci_bus * bus,unsigned char busnr) +{ +struct pci_bus * child; +struct list_head *tmp; + +if (bus->number == busnr) +return bus; + +list_for_each (tmp, &bus->children) { + child =pci_do_find_bus (pci_bus_b (tmp), busnr); +if (child) +return child; + } +return NULL ; +} + +/** +* pci_find_bus - locate PCI bus from a given bus number +* @busnr: number of desired PCI bus +* +* Given a PCI bus number, the desired PCI bus is located in system +* global list of PCI buses. If the bus is found, a pointer to its +* data structure is returned. If no bus is found, %NULL is returned. +*/ +struct pci_bus * +pci_find_bus (unsigned char busnr) +{ +struct pci_bus * bus; +struct pci_bus * tmp_bus; + +pci_for_each_bus (bus) { + tmp_bus =pci_do_find_bus (bus, busnr); +if (tmp_bus) +return tmp_bus; + } +return NULL ; +} +/** * pci_find_slot - locate PCI device from a given PCI slot * @bus: number of PCI bus on which desired PCI device resides
@@ -104,6 +143,7 @@return NULL ; } +EXPORT_SYMBOL (pci_find_bus);EXPORT_SYMBOL (pci_find_class);EXPORT_SYMBOL (pci_find_device);EXPORT_SYMBOL (pci_find_slot);
drivers/pci/setup-bus.c +7 -7
@@ -35,7 +35,7 @@#define ROUND_UP (x, a) (((x) + (a) - 1) & ~((a) - 1)) -static int __init +static int __devinit pbus_assign_resources_sorted (struct pci_bus *bus) {struct list_head *ln;
@@ -85,7 +85,7 @@requires that if there is no I/O ports or memory behind the bridge, corresponding range must be turned off by writing base value greater than limit to the bridge's base/limit registers. */ -static void __init +static void __devinit pci_setup_bridge (struct pci_bus *bus) {struct pbus_set_ranges_data ranges;
@@ -168,7 +168,7 @@/* Check whether the bridge supports optional I/O and prefetchable memory ranges. If not, the respective base/limit registers must be read-only and read as 0. */ -static void __init +static void __devinit pci_bridge_check_ranges (struct pci_bus *bus) {u16 io;
@@ -210,7 +210,7 @@since these windows have 4K granularity and the IO ranges of non-bridge PCI devices are limited to 256 bytes. We must be careful with the ISA aliasing though. */ -static void __init +static void __devinit pbus_size_io (struct pci_bus *bus) {struct list_head *ln;
@@ -259,7 +259,7 @@/* Calculate the size of the bus and minimal alignment which guarantees that all child resources fit in this size. */ -static void __init +static void __devinit pbus_size_mem (struct pci_bus *bus,unsigned long mask,unsigned long type) {struct list_head *ln;
@@ -331,7 +331,7 @@ b_res->end = size + min_align -1 ; } -void __init +void __devinit pbus_size_bridges (struct pci_bus *bus) {struct list_head *ln;
@@ -358,7 +358,7 @@pbus_size_mem (bus, mask, type); } -void __init +void __devinit pbus_assign_resources (struct pci_bus *bus) {struct list_head *ln;
include/linux/pci.h +7 -0
@@ -557,8 +557,12 @@ unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from);struct pci_dev *pci_find_class (unsigned int class,const struct pci_dev *from); +struct pci_bus *pci_find_bus (unsigned char busnr);struct pci_dev *pci_find_slot (unsigned int bus,unsigned int devfn); +unsigned char pci_bus_max_busnr (struct pci_bus * bus); +unsigned char pci_max_busnr (void );int pci_find_capability (struct pci_dev *dev,int cap); +int pci_bus_find_capability (struct pci_bus *bus,unsigned int devfn,int cap);int pci_bus_read_config_byte (struct pci_bus *bus,unsigned int devfn,int where,u8 *val);int pci_bus_read_config_word (struct pci_bus *bus,unsigned int devfn,int where,u16 *val);
@@ -613,6 +617,8 @@/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ +void pbus_assign_resources (struct pci_bus *bus); +void pbus_size_bridges (struct pci_bus *bus);int pci_claim_resource (struct pci_dev *,int );void pci_assign_unassigned_resources (void );void pdev_enable_device (struct pci_dev *);
@@ -634,6 +640,7 @@const struct pci_device_id *pci_match_device (const struct pci_device_id *ids,const struct pci_dev *dev);unsigned int pci_do_scan_bus (struct pci_bus *bus);struct pci_bus *pci_add_new_bus (struct pci_bus *parent,struct pci_dev *dev,int busnr); +int pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass);/* kmem_cache style wrapper around pci_alloc_consistent() */ struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev,
PATCH 1/1 PCI hotplug changes for 2.5.46
[oops, forgot to change the Subject: for the first two patches, sorry]
ChangeSet 1.875.1.3, 2002/11/02 22:57:45-08:00, [email protected]
PCI: move EXPORT_SYMBOL for the pbus functions to the setup-bus.c file.
This fixes a linking error if setup-bus.c isn't compiled into the kernel.
drivers/pci/Makefile +1 -1
@@ -3,7 +3,7 @@ # export-objs := access.o hotplug.o pci-driver.o pci.o pool.o \ - probe.o proc.o search.o compat.o + probe.o proc.o search.o compat.o setup-bus.o obj-y += access.o probe.o pci.o pool.o quirks.o \ compat.o names.o pci-driver.o search.o hotplug.o
drivers/pci/pci.c +0 -2
@@ -745,8 +745,6 @@EXPORT_SYMBOL (pci_dac_set_dma_mask);EXPORT_SYMBOL (pci_assign_resource);EXPORT_SYMBOL (pci_find_parent_resource); -EXPORT_SYMBOL (pbus_size_bridges); -EXPORT_SYMBOL (pbus_assign_resources);EXPORT_SYMBOL (pci_set_power_state);EXPORT_SYMBOL (pci_save_state);
drivers/pci/setup-bus.c +3 -0
@@ -19,6 +19,7 @@#include <linux/init.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/pci.h> #include <linux/errno.h> #include <linux/ioport.h>
@@ -357,6 +358,7 @@ }pbus_size_mem (bus, mask, type); } +EXPORT_SYMBOL (pbus_size_bridges);void __devinit pbus_assign_resources (struct pci_bus *bus)
@@ -379,6 +381,7 @@pci_setup_bridge (b); } } +EXPORT_SYMBOL (pbus_assign_resources);void __init pci_assign_unassigned_resources (void )
ChangeSet 1.875.1.4, 2002/11/02 23:00:20-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 2/4
This is patch 2 of 4 of my CompactPCI hotplug core and drivers, consisting of the CompactPCI hotplug driver core.
It is basically a glue layer on top of the PCI hotplug core that exposes an API roughly similiar in concept to the API implemented by MontaVista from the PICMG 2.12 specification, minus all the Win32isms and cruft.
CREDITS +8 -0
@@ -2218,6 +2218,14 @@ S: Lafayette, Indiana 47905 S: USA +N: Scott Murray +E: [email protected] +E: [email protected] +D: OPL3-SA2, OPL3-SA3 sound driver +D: CompactPCI hotplug core +S: Toronto, Ontario +S: Canada + N: Trond Myklebust E: [email protected] D: current NFS client hacker.
MAINTAINERS +7 -0
@@ -317,6 +317,13 @@ W: http://www.coda.cs.cmu.edu/ S: Maintained +COMPACTPCI HOTPLUG CORE +P: Scott Murray +M: [email protected] +M: [email protected] +L: [email protected] +S: Supported + COMPAQ FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA P: Amy Vanzant-Hodge M: Amy Vanzant-Hodge ([email protected])
drivers/hotplug/Kconfig +14 -0
@@ -73,5 +73,19 @@ When in doubt, say N. +config HOTPLUG_PCI_CPCI + tristate "CompactPCI Hotplug driver" + depends on HOTPLUG_PCI + help + Say Y here if you have a CompactPCI system card with CompactPCI + hotswap support per the PICMG 2.1 specification. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called cpci_hotplug.o. If you want to compile it + as a module, say M here and read <file:Documentation/modules.txt>. + + When in doubt, say N. + endmenu
drivers/hotplug/Makefile +5 -1
@@ -2,12 +2,13 @@ # Makefile for the Linux kernel pci hotplug controller drivers. # -export-objs := pci_hotplug_core.o pci_hotplug_util.o +export-objs := pci_hotplug_core.o pci_hotplug_util.o cpci_hotplug_core.o obj-$(CONFIG_HOTPLUG_PCI) += pci_hotplug.o obj-$(CONFIG_HOTPLUG_PCI_COMPAQ) += cpqphp.o obj-$(CONFIG_HOTPLUG_PCI_IBM) += ibmphp.o obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o +obj-$(CONFIG_HOTPLUG_PCI_CPCI) += cpci_hotplug.o pci_hotplug-objs := pci_hotplug_core.o \ pci_hotplug_util.o
@@ -27,6 +28,9 @@ acpiphp_glue.o \ acpiphp_pci.o \ acpiphp_res.o + +cpci_hotplug-objs := cpci_hotplug_core.o \ + cpci_hotplug_pci.o ifdef CONFIG_HOTPLUG_PCI_ACPI EXTRA_CFLAGS += -D_LINUX -I$(TOPDIR)/drivers/acpi
drivers/hotplug/cpci_hotplug.h new file +100 -0
100 lines not on this page · raw message
drivers/hotplug/cpci_hotplug_core.c new file +927 -0
927 lines not on this page · raw message
drivers/hotplug/cpci_hotplug_pci.c new file +685 -0
685 lines not on this page · raw message
drivers/hotplug/pci_hotplug.h +4 -0
@@ -167,5 +167,9 @@struct pci_dev_wrapped *wrapped_dev, struct pci_bus_wrapped *wrapped_parent); +int pci_is_dev_in_use (struct pci_dev *dev); + +int pci_remove_device_safe (struct pci_dev *dev); +#endif
drivers/hotplug/pci_hotplug_util.c +66 -7
94 lines not on this page · raw message
drivers/pci/Makefile +5 -0
@@ -25,6 +25,11 @@ obj-$(CONFIG_DDB5476) += setup-bus.o obj-$(CONFIG_SGI_IP27) += setup-irq.o +# CompactPCI hotplug requires the pbus_* functions +ifdef CONFIG_HOTPLUG_PCI_CPCI +obj-y += setup-bus.o +endif + ifndef CONFIG_X86 obj-y += syscall.o endif
ChangeSet 1.875.1.5, 2002/11/02 23:07:09-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 3/4
This is patch 3 of 4 of my CompactPCI hotplug core and drivers, consisting of the Ziatech ZT5550 hotplug driver.
The hardware banging code in this driver started its life in the PICMG 2.12 driver code that MontaVista released at the end of 2001.
CREDITS +1 -0
@@ -2223,6 +2223,7 @@ E: [email protected] D: OPL3-SA2, OPL3-SA3 sound driver D: CompactPCI hotplug core +D: Ziatech ZT5550 CompactPCI hotplug drivers S: Toronto, Ontario S: Canada
MAINTAINERS +7 -0
@@ -324,6 +324,13 @@ L: [email protected] S: Supported +COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER +P: Scott Murray +M: [email protected] +M: [email protected] +L: [email protected] +S: Supported + COMPAQ FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA P: Amy Vanzant-Hodge M: Amy Vanzant-Hodge ([email protected])
drivers/hotplug/Kconfig +14 -0
@@ -87,5 +87,19 @@ When in doubt, say N. +config HOTPLUG_PCI_CPCI_ZT5550 + tristate "Ziatech ZT5550 CompactPCI Hotplug driver" + depends on HOTPLUG_PCI_CPCI && X86 + help + Say Y here if you have an Performance Technologies (formerly Intel, + formerly just Ziatech) Ziatech ZT5550 CompactPCI system card. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called cpcihp_zt5550.o. If you want to compile it + as a module, say M here and read <file:Documentation/modules.txt>. + + When in doubt, say N. + endmenu
drivers/hotplug/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_HOTPLUG_PCI_IBM) += ibmphp.o obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o obj-$(CONFIG_HOTPLUG_PCI_CPCI) += cpci_hotplug.o +obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o pci_hotplug-objs := pci_hotplug_core.o \ pci_hotplug_util.o
drivers/hotplug/cpcihp_zt5550.c new file +306 -0
306 lines not on this page · raw message
drivers/hotplug/cpcihp_zt5550.h new file +79 -0
79 lines not on this page · raw message
include/linux/pci_ids.h +3 -0
@@ -1100,6 +1100,9 @@#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 + +#define PCI_VENDOR_ID_ZIATECH 0x1138 +#define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550#define PCI_VENDOR_ID_CYCLONE 0x113c#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001
ChangeSet 1.875.1.6, 2002/11/02 23:14:54-08:00, [email protected]
[PATCH] 2.5.45 CompactPCI driver patch 4/4
This is a patch 4 of 4 of my CompactPCI hotplug core and drivers, consisting of the generic port I/O cPCI hotplug driver.
Let me know if the kernel parameter parsing code that's #ifndef MODULE is objectionable. I spent quite a while today testing it, it seems reasonably robust. Without it, this driver would only be useable as a module, which I've not figured out how to do with the new kernel configuration stuff.
CREDITS +1 -1
@@ -2223,7 +2223,7 @@ E: [email protected] D: OPL3-SA2, OPL3-SA3 sound driver D: CompactPCI hotplug core -D: Ziatech ZT5550 CompactPCI hotplug drivers +D: Ziatech ZT5550 and generic CompactPCI hotplug drivers S: Toronto, Ontario S: Canada
MAINTAINERS +7 -0
@@ -331,6 +331,13 @@ L: [email protected] S: Supported +COMPACTPCI HOTPLUG GENERIC DRIVER +P: Scott Murray +M: [email protected] +M: [email protected] +L: [email protected] +S: Supported + COMPAQ FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA P: Amy Vanzant-Hodge M: Amy Vanzant-Hodge ([email protected])
drivers/hotplug/Kconfig +15 -0
@@ -101,5 +101,20 @@ When in doubt, say N. +config HOTPLUG_PCI_CPCI_GENERIC + tristate "Generic port I/O CompactPCI Hotplug driver" + depends on HOTPLUG_PCI_CPCI && X86 + help + Say Y here if you have a CompactPCI system card that exposes the #ENUM + hotswap signal as a bit in a system register that can be read through + standard port I/O. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called cpcihp_generic.o. If you want to compile it + as a module, say M here and read <file:Documentation/modules.txt>. + + When in doubt, say N. + endmenu
drivers/hotplug/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o obj-$(CONFIG_HOTPLUG_PCI_CPCI) += cpci_hotplug.o obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o +obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o pci_hotplug-objs := pci_hotplug_core.o \ pci_hotplug_util.o
drivers/hotplug/cpcihp_generic.c new file +291 -0
291 lines not on this page · raw message
ChangeSet 1.875.1.7, 2002/11/02 23:40:07-08:00, [email protected]
[PATCH] PCI Hotplug: removed a compiler warning of a unused variable in the cpcihp_generic driver.
drivers/hotplug/cpcihp_generic.c +0 -1
@@ -63,7 +63,6 @@/* local variables */ static int debug; -static int setup;static char * bridge;static u8 bridge_busnr;static u8 bridge_slot;
ChangeSet 1.875.1.8, 2002/11/02 23:43:53-08:00, [email protected]
[PATCH] PCI Hotplug: fix compiler warning.
drivers/hotplug/pci_hotplug_util.c +1 -1
@@ -96,7 +96,7 @@ {struct pci_bus *bus;struct pci_bus_wrapped wrapped_bus; -int result; +int result =0 ;dbg ("scanning bridge %02x, %02x\n" ,PCI_SLOT (wrapped_dev->dev->devfn),PCI_FUNC (wrapped_dev->dev->devfn));
ChangeSet 1.875.1.9, 2002/11/03 00:02:17-08:00, [email protected]
[PATCH] Patch: 2.5.45 PCI Fixups for PCI HotPlug
The following patch changes function scopes only but fixes kernel dump on Hot-Add of PCI bridge cards.
arch/i386/pci/fixup.c +2 -2
@@ -138,7 +138,7 @@#define VIA_8363_KL133_REVISION_ID 0x81#define VIA_8363_KM133_REVISION_ID 0x84 -static void __init pci_fixup_via_northbridge_bug (struct pci_dev *d) +static void __devinit pci_fixup_via_northbridge_bug (struct pci_dev *d) {u8 v;u8 revision;
@@ -180,7 +180,7 @@* system to PCI bus no matter what are their window settings, so they are * "transparent" (or subtractive decoding) from programmers point of view. */ -static void __init pci_fixup_transparent_bridge (struct pci_dev *dev) +static void __devinit pci_fixup_transparent_bridge (struct pci_dev *dev) {if ((dev->class >>8 ) ==PCI_CLASS_BRIDGE_PCI && (dev->device &0xff00 ) ==0x2400 )
drivers/pci/quirks.c +25 -25
200 lines not on this page · raw message
ChangeSet 1.875.1.10, 2002/11/03 00:08:36-08:00, [email protected]
[PATCH] ACPI PCI hotplug updates
These are updates of the acpiphp driver for 2.5.
- change debug flag from 'acpiphp_debug' to 'debug' for insmod
- whitespace cleanup
- message cleanup
drivers/hotplug/acpiphp.h +4 -4
@@ -41,12 +41,12 @@ #define dbg(format, arg...) \ do { \ if (acpiphp_debug) \ - printk (KERN_DEBUG "%s: " format "\n", \ + printk(KERN_DEBUG "%s: " format, \ MY_NAME , ## arg); \ } while (0) -#define err(format, arg...) printk (KERN_ERR "%s: " format "\n", MY_NAME , ## arg) -#define info(format, arg...) printk (KERN_INFO "%s: " format "\n", MY_NAME , ## arg) -#define warn(format, arg...) printk (KERN_WARNING "%s: " format "\n", MY_NAME , ## arg) +#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg) +#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg) +#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)#define SLOT_MAGIC 0x67267322/* name size which is used for entries in pcihpfs */
drivers/hotplug/acpiphp_core.c +83 -80
346 lines not on this page · raw message
drivers/hotplug/acpiphp_glue.c +91 -96
629 lines not on this page · raw message
drivers/hotplug/acpiphp_pci.c +32 -33
222 lines not on this page · raw message
drivers/hotplug/acpiphp_res.c +24 -24
149 lines not on this page · raw message