aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:49:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:49:57 -0500
commita3ea9b584ed2acdeae817f0dc91a5880e0828a05 (patch)
tree5b4ef9b10c05aa84419a6ba6187d0dcd14654c97 /drivers/pci/pci.c
parent554f593d6c411e717a71ffdcb0cfb46bb2394502 (diff)
parentb2e6e3ba7deb525f180df64f32f3fcb214538bea (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (49 commits) [PATCH] acpiphp: fix acpi_path_name [PATCH] ibmphp: remove TRUE and FALSE [PATCH] PCI Hotplug: add common acpi functions to core [PATCH] PCI: kzalloc() conversion in drivers/pci [PATCH] acpiphp: Scan slots under the nested P2P bridge [PATCH] PCI Hotplug: SN: Fix cleanup on hotplug removal of PPB [PATCH] shpchp: cleanup bus speed handling [PATCH] PCI: fix pci_request_region[s] arg [PATCH] PCI: Provide a boot parameter to disable MSI [PATCH] PCI: the scheduled removal of PCI_LEGACY_PROC [PATCH] PCI: cpqphp_ctrl.c: board_replaced(): remove dead code [PATCH] acpiphp: fix bridge handle [PATCH] acpiphp - slot management fix - V4 [PATCH] acpi: remove dock event handling from ibm_acpi [PATCH] acpiphp: add dock event handling [PATCH] acpi: export acpi_bus_trim [PATCH] acpiphp: add new bus to acpi [PATCH] PCI: Move pci_dev_put outside a spinlock [PATCH] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix [PATCH] PCI: fix problems with MSI-X on ia64 ...
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d2d187916643..bea1ad1ad5ba 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -19,7 +19,6 @@
19#include <asm/dma.h> /* isa_dma_bridge_buggy */ 19#include <asm/dma.h> /* isa_dma_bridge_buggy */
20#include "pci.h" 20#include "pci.h"
21 21
22#if 0
23 22
24/** 23/**
25 * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children 24 * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -34,7 +33,7 @@ pci_bus_max_busnr(struct pci_bus* bus)
34 struct list_head *tmp; 33 struct list_head *tmp;
35 unsigned char max, n; 34 unsigned char max, n;
36 35
37 max = bus->number; 36 max = bus->subordinate;
38 list_for_each(tmp, &bus->children) { 37 list_for_each(tmp, &bus->children) {
39 n = pci_bus_max_busnr(pci_bus_b(tmp)); 38 n = pci_bus_max_busnr(pci_bus_b(tmp));
40 if(n > max) 39 if(n > max)
@@ -42,7 +41,9 @@ pci_bus_max_busnr(struct pci_bus* bus)
42 } 41 }
43 return max; 42 return max;
44} 43}
44EXPORT_SYMBOL_GPL(pci_bus_max_busnr);
45 45
46#if 0
46/** 47/**
47 * pci_max_busnr - returns maximum PCI bus number 48 * pci_max_busnr - returns maximum PCI bus number
48 * 49 *
@@ -495,9 +496,8 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
495int 496int
496pci_enable_device(struct pci_dev *dev) 497pci_enable_device(struct pci_dev *dev)
497{ 498{
498 int err; 499 int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
499 500 if (err)
500 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
501 return err; 501 return err;
502 pci_fixup_device(pci_fixup_enable, dev); 502 pci_fixup_device(pci_fixup_enable, dev);
503 dev->is_enabled = 1; 503 dev->is_enabled = 1;
@@ -639,7 +639,7 @@ void pci_release_region(struct pci_dev *pdev, int bar)
639 * Returns 0 on success, or %EBUSY on error. A warning 639 * Returns 0 on success, or %EBUSY on error. A warning
640 * message is also printed on failure. 640 * message is also printed on failure.
641 */ 641 */
642int pci_request_region(struct pci_dev *pdev, int bar, char *res_name) 642int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name)
643{ 643{
644 if (pci_resource_len(pdev, bar) == 0) 644 if (pci_resource_len(pdev, bar) == 0)
645 return 0; 645 return 0;
@@ -697,7 +697,7 @@ void pci_release_regions(struct pci_dev *pdev)
697 * Returns 0 on success, or %EBUSY on error. A warning 697 * Returns 0 on success, or %EBUSY on error. A warning
698 * message is also printed on failure. 698 * message is also printed on failure.
699 */ 699 */
700int pci_request_regions(struct pci_dev *pdev, char *res_name) 700int pci_request_regions(struct pci_dev *pdev, const char *res_name)
701{ 701{
702 int i; 702 int i;
703 703
@@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str)
900 if (k) 900 if (k)
901 *k++ = 0; 901 *k++ = 0;
902 if (*str && (str = pcibios_setup(str)) && *str) { 902 if (*str && (str = pcibios_setup(str)) && *str) {
903 /* PCI layer options should be handled here */ 903 if (!strcmp(str, "nomsi")) {
904 printk(KERN_ERR "PCI: Unknown option `%s'\n", str); 904 pci_no_msi();
905 } else {
906 printk(KERN_ERR "PCI: Unknown option `%s'\n",
907 str);
908 }
905 } 909 }
906 str = k; 910 str = k;
907 } 911 }