PCI fixes for 2.6.10-rc2
Subsystems (5)
PATCH 1/1 PCI fixes for 2.6.10-rc2
Hi,
Here are some small PCI and PCI hotplug fixes for 2.6.10-rc2.
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/pciehp_sysfs.c | 143 ----------------------------------- Documentation/pci.txt | 8 - drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/cpcihp_generic.c | 2 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/rpaphp_pci.c | 9 -- 6 files changed, 8 insertions(+), 158 deletions(-)
-----
Adrian Bunk:
o PCI Hotplug: remove unused drivers/pci/hotplug/pciehp_sysfs.c
Randy Dunlap:
o PCI Hotplug: cpcihp_generic: fix module_param data type
Rolf Eike Beer:
o PCI: fix Documentation/pci.txt inconsistency
o PCI Hotplug: clean up rpaphp_pci.c::rpaphp_find_pci_dev
PATCH 1/1 PCI fixes for 2.6.10-rc2
ChangeSet 1.2164, 2004/11/19 10:01:54-08:00, [email protected]
[PATCH] PCI Hotplug: remove unused drivers/pci/hotplug/pciehp_sysfs.c
Remove unused the drivers/pci/hotplug/pciehp_sysfs.c
drivers/pci/hotplug/pciehp_sysfs.c | 143 ------------------------------------- drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 3 files changed, 147 deletions(-)
drivers/pci/hotplug/Makefile +0 -1
@@ -51,7 +51,6 @@ pciehp-objs := pciehp_core.o \ pciehp_ctrl.o \ pciehp_pci.o \ - pciehp_sysfs.o \ pciehp_hpc.o ifdef CONFIG_ACPI_BUS pciehp-objs += pciehprm_acpi.o
drivers/pci/hotplug/pciehp.h +0 -3
@@ -207,9 +207,6 @@#define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n"#define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" -/* sysfs function for the hotplug controller info */ -extern void pciehp_create_ctrl_files (struct controller *ctrl); -/* controller functions */ extern int pciehprm_find_available_resources (struct controller *ctrl);extern int pciehp_event_start_thread (void );
drivers/pci/hotplug/pciehp_sysfs.c deleted +0 -143
143 lines not on this page · raw message
ChangeSet 1.2165, 2004/11/19 10:02:07-08:00, [email protected]
[PATCH] PCI Hotplug: clean up rpaphp_pci.c::rpaphp_find_pci_dev
this patch improves rpaphp_find_pci_dev. First it uses the for_each_pci_dev macro instead of the while loop, making this hotplug safe (which is a good idea in a hotplug driver, isn't it?). Then it removes retval_dev. retval_dev is set to the found device when something is found, NULL otherwise. If nothing is found dev will be NULL at the end of the loop anyway and the found device if we found something, no need for retval_dev then. And a very small coding style fix.
drivers/pci/hotplug/rpaphp_pci.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/pci/hotplug/rpaphp_pci.c +4 -5
@@ -31,18 +31,17 @@struct pci_dev *rpaphp_find_pci_dev (struct device_node *dn) { -struct pci_dev *retval_dev =NULL , *dev =NULL ; +struct pci_dev *dev =NULL ;char bus_id[BUS_ID_SIZE ]; -sprintf (bus_id,"%04x:%02x:%02x.%d" ,dn->phb->global_number, +sprintf (bus_id,"%04x:%02x:%02x.%d" , dn->phb->global_number, dn->busno,PCI_SLOT (dn->devfn),PCI_FUNC (dn->devfn)); -while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) { +for_each_pci_dev (dev) {if (!strcmp (pci_name (dev), bus_id)) { - retval_dev = dev;break ; } } -return retval_dev; +return dev; }EXPORT_SYMBOL_GPL (rpaphp_find_pci_dev);
ChangeSet 1.2166, 2004/11/19 10:02:19-08:00, [email protected]
[PATCH] PCI Hotplug: cpcihp_generic: fix module_param data type
drivers/pci/hotplug/cpcihp_generic.c:214: warning: return from incompatible pointer type
drivers/pci/hotplug/cpcihp_generic.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/pci/hotplug/cpcihp_generic.c +1 -1
@@ -63,7 +63,7 @@/* local variables */ static int debug; -static char bridge[256 ]; +static char *bridge;static u8 bridge_busnr;static u8 bridge_slot;static struct pci_bus *bus;
ChangeSet 1.2167, 2004/11/19 10:02:32-08:00, [email protected]
[PATCH] PCI: fix Documentation/pci.txt inconsistency
Documentation/pci.txt | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
Documentation/pci.txt +3 -5
@@ -156,11 +156,9 @@ VENDOR_ID or DEVICE_ID. This allows searching for any device from a specific vendor, for example. -Note that these functions are not hotplug-safe. Their hotplug-safe -replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). -They increment the reference count on the pci_dev that they return. -You must eventually (possibly at module unload) decrement the reference -count on these devices by calling pci_dev_put(). + These functions are hotplug-safe. They increment the reference count on +the pci_dev that they return. You must eventually (possibly at module unload) +decrement the reference count on these devices by calling pci_dev_put(). 3. Enabling and disabling devices