PCI Hotplug changes for 2.4.21-pre1
PATCH 1/1 PCI Hotplug changes for 2.4.21-pre1
Hi,
Here is an update for the PCI Hotplug core and the PCI ACPI Hotplug driver. This fixes a problem for ia64 machines, enabling the driver to now work properly. Thanks go out to Matthew Wilcox for finally fixing this problem.
Please pull from: bk://linuxusb.bkbits.net/pci_hp-2.4
The raw patches will follow.
thanks,
greg k-h
drivers/hotplug/acpiphp.h | 2 drivers/hotplug/acpiphp_glue.c | 16 -- drivers/hotplug/acpiphp_pci.c | 48 +++---- drivers/hotplug/pci_hotplug.h | 12 + drivers/hotplug/pci_hotplug_util.c | 223 ++++++++++++++++++++++--------------- 5 files changed, 176 insertions(+), 125 deletions(-)
-----
[email protected], 2002-12-16 11:47:08-08:00, [email protected]
[PATCH] Convert acpiphp to pci_bus_*() API [2/2]
Convert the acpiphp driver from the pci_*_nodev() API to the pci_bus_*() API. This patch is relative to 2.4.21-bk.
drivers/hotplug/acpiphp.h | 2 - drivers/hotplug/acpiphp_glue.c | 16 ++----------- drivers/hotplug/acpiphp_pci.c | 48 +++++++++++++++++++---------------------- 3 files changed, 26 insertions(+), 40 deletions(-)
------
[email protected], 2002-12-16 11:46:55-08:00, [email protected]
[PATCH] Add pci_bus_*() API for 2.4 [1/2]
Introduce the pci_bus_(read|write)_config(byte|word|dword) functions from Linux 2.5. Reimplement the pci_(read|write)_config(byte|word|dword)_nodev functions as compatibility wrappers.
drivers/hotplug/pci_hotplug.h | 12 + drivers/hotplug/pci_hotplug_util.c | 223 ++++++++++++++++++++++--------------- 2 files changed, 150 insertions(+), 85 deletions(-)
------
PATCH 1/1 PCI Hotplug changes for 2.4.21-pre1
ChangeSet 1.885, 2002/12/16 11:46:55-08:00, [email protected]
[PATCH] Add pci_bus_*() API for 2.4 [1/2]
Introduce the pci_bus_(read|write)_config(byte|word|dword) functions from Linux 2.5. Reimplement the pci_(read|write)_config(byte|word|dword)_nodev functions as compatibility wrappers.
drivers/hotplug/pci_hotplug.h +12 -0
@@ -167,6 +167,18 @@struct pci_dev_wrapped *wrapped_dev, struct pci_bus_wrapped *wrapped_parent); +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); +int pci_bus_read_config_dword (struct pci_bus *bus,unsigned int devfn,int where,u32 *val); +int pci_bus_write_config_byte (struct pci_bus *bus,unsigned int devfn,int where,u8 val); +int pci_bus_write_config_word (struct pci_bus *bus,unsigned int devfn,int where,u16 val); +int pci_bus_write_config_dword (struct pci_bus *bus,unsigned int devfn,int where,u32 val); + +/* +* Compatibility functions. Don't use these, use the +* pci_bus_*() functions above. +*/ +extern int pci_read_config_byte_nodev (struct pci_ops *ops,u8 bus,u8 device,u8 function,int where,u8 *val); extern int pci_read_config_word_nodev (struct pci_ops *ops, u8 bus, u8 device,
drivers/hotplug/pci_hotplug_util.c +138 -85
383 lines not on this page · raw message
ChangeSet 1.886, 2002/12/16 11:47:08-08:00, [email protected]
[PATCH] Convert acpiphp to pci_bus_*() API [2/2]
Convert the acpiphp driver from the pci_*_nodev() API to the pci_bus_*() API. This patch is relative to 2.4.21-bk.
drivers/hotplug/acpiphp.h +0 -2
@@ -173,8 +173,6 @@/* PCI-to-PCI bridge device */ struct pci_dev *pci_dev; -struct pci_ops *pci_ops; -/* ACPI 2.0 _HPP parameters */ struct hpp_param hpp;
drivers/hotplug/acpiphp_glue.c +3 -13
@@ -43,7 +43,6 @@static void handle_hotplug_event_bridge (acpi_handle ,u32 ,void *);static void handle_hotplug_event_func (acpi_handle ,u32 ,void *); -static struct pci_ops *default_ops;/* * initialization & terminatation routines
@@ -515,7 +514,6 @@ bridge->bus = bus; bridge->pci_bus =find_pci_bus (&pci_root_buses, bus); - bridge->pci_ops = bridge->pci_bus->ops; bridge->res_lock =SPIN_LOCK_UNLOCKED ;
@@ -592,7 +590,6 @@kfree (bridge);return ; } - bridge->pci_ops = bridge->pci_bus->ops; bridge->res_lock =SPIN_LOCK_UNLOCKED ;
@@ -1072,11 +1069,9 @@if (ACPI_SUCCESS (status) && sta)break ; }else { -pci_read_config_dword_nodev (default_ops, - slot->bridge->bus, - slot->device, - func->function, -PCI_VENDOR_ID , &dvid); +pci_bus_read_config_dword (slot->bridge->pci_bus, +PCI_DEVFN (slot->device, func->function), +PCI_VENDOR_ID , &dvid);if (dvid !=0xffffffff ) { sta =ACPI_STA_ALL ;break ;
@@ -1204,11 +1199,6 @@acpi_status status;if (list_empty (&pci_root_buses)) -return -1 ; - -/* set default pci_ops for configuration space operation */ - default_ops =pci_bus_b (pci_root_buses.next)->ops; -if (!default_ops)return -1 ; status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
drivers/hotplug/acpiphp_pci.c +23 -25
115 lines not on this page · raw message