PCI changes for 2.5.30
PATCH 1/1 PCI changes for 2.5.30
Two small PCI changes, one for organizational sake, and the other to fix a PCI hotplug bug.
Pull from: bk://linuxusb.bkbits.net/pci_hp-2.5
thanks,
greg k-h
drivers/pci/Makefile | 3 ++- drivers/pci/compat.c | 14 ++++++++++++++ drivers/pci/names.c | 10 +++++----- drivers/pci/pci.c | 12 ------------ 4 files changed, 21 insertions(+), 18 deletions(-)
------
[email protected], 2002-08-02 16:45:14-07:00, [email protected]
[PATCH] [PATCH] PCI Hotplug patch to drivers/pci/names.c
I found that both compaq and ibm PCI hotplug driver call pci_scan_slot(), which eventually call pci_name_device() in drivers/pci/names.c.
pci_name_device() is declared as __devinit while other data are declared as __initdata.
This may result in undefined behavior for example, /proc/pci.
drivers/pci/names.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
------
[email protected], 2002-08-02 16:40:20-07:00, [email protected]
PCI: move the EXPORT_SYMBOL(pcibios_*) declarations to the proper file.
drivers/pci/Makefile | 3 ++- drivers/pci/compat.c | 14 ++++++++++++++ drivers/pci/pci.c | 12 ------------ 3 files changed, 16 insertions(+), 13 deletions(-)
------
# 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.513 -> 1.514 # drivers/pci/pci.c 1.44 -> 1.45 # drivers/pci/compat.c 1.2 -> 1.3 # drivers/pci/Makefile 1.12 -> 1.13
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/02 [email protected] 1.514
# PCI: move the EXPORT_SYMBOL(pcibios_*) declarations to the proper file. # --------------------------------------------
#
drivers/pci/Makefile +2 -1
@@ -2,7 +2,8 @@ # Makefile for the PCI bus specific drivers. # -export-objs := access.o hotplug.o pci-driver.o pci.o pool.o probe.o proc.o search.o +export-objs := access.o hotplug.o pci-driver.o pci.o pool.o \ + probe.o proc.o search.o compat.o obj-y += access.o probe.o pci.o pool.o quirks.o \ compat.o names.o pci-driver.o search.o
drivers/pci/compat.c +14 -0
@@ -8,8 +8,11 @@#include <linux/types.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/pci.h> +/* Obsolete functions, these will be going away... */ +int pcibios_present (void ) {
@@ -63,3 +66,14 @@ PCI_OP(write, byte, char) PCI_OP(write, word, short) PCI_OP(write, dword, int) + + +EXPORT_SYMBOL (pcibios_present); +EXPORT_SYMBOL (pcibios_read_config_byte); +EXPORT_SYMBOL (pcibios_read_config_word); +EXPORT_SYMBOL (pcibios_read_config_dword); +EXPORT_SYMBOL (pcibios_write_config_byte); +EXPORT_SYMBOL (pcibios_write_config_word); +EXPORT_SYMBOL (pcibios_write_config_dword); +EXPORT_SYMBOL (pcibios_find_class); +EXPORT_SYMBOL (pcibios_find_device);
drivers/pci/pci.c +0 -12
@@ -602,18 +602,6 @@EXPORT_SYMBOL (pci_restore_state);EXPORT_SYMBOL (pci_enable_wake); -/* Obsolete functions */ - -EXPORT_SYMBOL (pcibios_present); -EXPORT_SYMBOL (pcibios_read_config_byte); -EXPORT_SYMBOL (pcibios_read_config_word); -EXPORT_SYMBOL (pcibios_read_config_dword); -EXPORT_SYMBOL (pcibios_write_config_byte); -EXPORT_SYMBOL (pcibios_write_config_word); -EXPORT_SYMBOL (pcibios_write_config_dword); -EXPORT_SYMBOL (pcibios_find_class); -EXPORT_SYMBOL (pcibios_find_device); -/* Quirk info */ EXPORT_SYMBOL (isa_dma_bridge_buggy);
# 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.514 -> 1.515
# drivers/pci/names.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/02 [email protected] 1.515
# [PATCH] [PATCH] PCI Hotplug patch to drivers/pci/names.c
#
# I found that both compaq and ibm PCI hotplug driver call pci_scan_slot(),
# which eventually call pci_name_device() in drivers/pci/names.c. # # pci_name_device() is declared as __devinit while other data are # declared as __initdata. # This may result in undefined behavior for example, /proc/pci. # -------------------------------------------- # diff -Nru a/drivers/pci/names.c b/drivers/pci/names.c --- a/drivers/pci/names.c Fri Aug 2 16:49:27 2002 +++ b/drivers/pci/names.c Fri Aug 2 16:49:27 2002 @@ -32,18 +32,18 @@ * real memory.. Parse the same file multiple times * to get all the info. */ -#define VENDOR( vendor, name ) static char __vendorstr_##vendor[] __initdata = name; +#define VENDOR( vendor, name ) static char __vendorstr_##vendor[] __devinitdata = name; #define ENDVENDOR() -#define DEVICE( vendor, device, name ) static char __devicestr_##vendor##device[] __initdata = name; +#define DEVICE( vendor, device, name ) static char __devicestr_##vendor##device[] __devinitdata = name; #include "devlist.h"
-#define VENDOR( vendor, name ) static struct pci_device_info __devices_##vendor[] __initdata = {
+#define VENDOR( vendor, name ) static struct pci_device_info __devices_##vendor[] __devinitdata = {
#define ENDVENDOR() };
#define DEVICE( vendor, device, name ) { 0x##device, 0, __devicestr_##vendor##device },
#include "devlist.h"
-static struct pci_vendor_info __initdata pci_vendor_list[] = { +static struct pci_vendor_info __devinitdata pci_vendor_list[] = {
#define VENDOR( vendor, name ) { 0x##vendor, sizeof(__devices_##vendor) / sizeof(struct pci_device_info), __vendorstr_##vendor, __devices_##vendor },
#define ENDVENDOR()
#define DEVICE( vendor, device, name )
@@ -121,7 +121,7 @@
#else
-void __init pci_name_device(struct pci_dev *dev) +void __devinit pci_name_device(struct pci_dev *dev)
{
}