diff options
-rw-r--r-- | Documentation/DocBook/deviceiobook.tmpl | 3 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci.h | 8 | ||||
-rw-r--r-- | drivers/pci/probe.c | 18 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 7 | ||||
-rw-r--r-- | include/asm-i386/io.h | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 4 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 3 | ||||
-rw-r--r-- | lib/iomap.c | 15 |
9 files changed, 42 insertions, 23 deletions
diff --git a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl index 90ed23df1f68..c917de681ccd 100644 --- a/Documentation/DocBook/deviceiobook.tmpl +++ b/Documentation/DocBook/deviceiobook.tmpl | |||
@@ -316,7 +316,8 @@ CPU B: spin_unlock_irqrestore(&dev_lock, flags) | |||
316 | 316 | ||
317 | <chapter id="pubfunctions"> | 317 | <chapter id="pubfunctions"> |
318 | <title>Public Functions Provided</title> | 318 | <title>Public Functions Provided</title> |
319 | !Einclude/asm-i386/io.h | 319 | !Iinclude/asm-i386/io.h |
320 | !Elib/iomap.c | ||
320 | </chapter> | 321 | </chapter> |
321 | 322 | ||
322 | </book> | 323 | </book> |
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 79ff6b4de3a6..37d72f123a80 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -1746,10 +1746,8 @@ static void pushbutton_helper_thread(unsigned long data) | |||
1746 | static int event_thread(void* data) | 1746 | static int event_thread(void* data) |
1747 | { | 1747 | { |
1748 | struct controller *ctrl; | 1748 | struct controller *ctrl; |
1749 | lock_kernel(); | 1749 | |
1750 | daemonize("phpd_event"); | 1750 | daemonize("phpd_event"); |
1751 | |||
1752 | unlock_kernel(); | ||
1753 | 1751 | ||
1754 | while (1) { | 1752 | while (1) { |
1755 | dbg("!!!!event_thread sleeping\n"); | 1753 | dbg("!!!!event_thread sleeping\n"); |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index c6e132d7c0f7..4c36e80f6d26 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -5,12 +5,7 @@ extern int pci_uevent(struct device *dev, char **envp, int num_envp, | |||
5 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); | 5 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); |
6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); | 6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); |
7 | extern void pci_cleanup_rom(struct pci_dev *dev); | 7 | extern void pci_cleanup_rom(struct pci_dev *dev); |
8 | extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 8 | |
9 | resource_size_t size, resource_size_t align, | ||
10 | resource_size_t min, unsigned int type_mask, | ||
11 | void (*alignf)(void *, struct resource *, | ||
12 | resource_size_t, resource_size_t), | ||
13 | void *alignf_data); | ||
14 | /* Firmware callbacks */ | 9 | /* Firmware callbacks */ |
15 | extern pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); | 10 | extern pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); |
16 | extern int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t state); | 11 | extern int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t state); |
@@ -35,7 +30,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } | |||
35 | 30 | ||
36 | /* Functions for PCI Hotplug drivers to use */ | 31 | /* Functions for PCI Hotplug drivers to use */ |
37 | extern unsigned int pci_do_scan_bus(struct pci_bus *bus); | 32 | extern unsigned int pci_do_scan_bus(struct pci_bus *bus); |
38 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
39 | 33 | ||
40 | extern void pci_remove_legacy_files(struct pci_bus *bus); | 34 | extern void pci_remove_legacy_files(struct pci_bus *bus); |
41 | 35 | ||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 34b8dae0d90f..27e00b2d7b5b 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -653,20 +653,20 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass | |||
653 | 653 | ||
654 | sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number); | 654 | sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number); |
655 | 655 | ||
656 | /* Has only triggered on CardBus, fixup is in yenta_socket */ | ||
656 | while (bus->parent) { | 657 | while (bus->parent) { |
657 | if ((child->subordinate > bus->subordinate) || | 658 | if ((child->subordinate > bus->subordinate) || |
658 | (child->number > bus->subordinate) || | 659 | (child->number > bus->subordinate) || |
659 | (child->number < bus->number) || | 660 | (child->number < bus->number) || |
660 | (child->subordinate < bus->number)) { | 661 | (child->subordinate < bus->number)) { |
661 | printk(KERN_WARNING "PCI: Bus #%02x (-#%02x) is " | 662 | pr_debug("PCI: Bus #%02x (-#%02x) is %s" |
662 | "hidden behind%s bridge #%02x (-#%02x)%s\n", | 663 | "hidden behind%s bridge #%02x (-#%02x)\n", |
663 | child->number, child->subordinate, | 664 | child->number, child->subordinate, |
664 | bus->self->transparent ? " transparent" : " ", | 665 | (bus->number > child->subordinate && |
665 | bus->number, bus->subordinate, | 666 | bus->subordinate < child->number) ? |
666 | pcibios_assign_all_busses() ? " " : | 667 | "wholly " : " partially", |
667 | " (try 'pci=assign-busses')"); | 668 | bus->self->transparent ? " transparent" : " ", |
668 | printk(KERN_WARNING "Please report the result to " | 669 | bus->number, bus->subordinate); |
669 | "<bk@suse.de> to fix this permanently\n"); | ||
670 | } | 670 | } |
671 | bus = bus->parent; | 671 | bus = bus->parent; |
672 | } | 672 | } |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c559085c89a5..2d40f437b9fc 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -947,7 +947,7 @@ static void k8t_sound_hostbridge(struct pci_dev *dev) | |||
947 | unsigned char val; | 947 | unsigned char val; |
948 | 948 | ||
949 | pci_read_config_byte(dev, 0x50, &val); | 949 | pci_read_config_byte(dev, 0x50, &val); |
950 | if (val == 0x88 || val == 0xc8) { | 950 | if (val == 0xc8) { |
951 | /* Assume it's probably a MSI-K8T-Neo2Fir */ | 951 | /* Assume it's probably a MSI-K8T-Neo2Fir */ |
952 | printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); | 952 | printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); |
953 | pci_write_config_byte(dev, 0x50, val & (~0x40)); | 953 | pci_write_config_byte(dev, 0x50, val & (~0x40)); |
@@ -1485,7 +1485,7 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | |||
1485 | 1485 | ||
1486 | iounmap(csr); | 1486 | iounmap(csr); |
1487 | } | 1487 | } |
1488 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); | 1488 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); |
1489 | 1489 | ||
1490 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) | 1490 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) |
1491 | { | 1491 | { |
@@ -1650,6 +1650,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCN | |||
1650 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); | 1650 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); |
1651 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); | 1651 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); |
1652 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); | 1652 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); |
1653 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi); | ||
1654 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi); | ||
1655 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi); | ||
1653 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); | 1656 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); |
1654 | 1657 | ||
1655 | /* Disable MSI on chipsets that are known to not support it */ | 1658 | /* Disable MSI on chipsets that are known to not support it */ |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 7b65b5b00034..e8e0bd641120 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -112,6 +112,9 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign | |||
112 | * writew/writel functions and the other mmio helpers. The returned | 112 | * writew/writel functions and the other mmio helpers. The returned |
113 | * address is not guaranteed to be usable directly as a virtual | 113 | * address is not guaranteed to be usable directly as a virtual |
114 | * address. | 114 | * address. |
115 | * | ||
116 | * If the area you are trying to map is a PCI BAR you should have a | ||
117 | * look at pci_iomap(). | ||
115 | */ | 118 | */ |
116 | 119 | ||
117 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 120 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e7d8d4e19a53..038a0dc7273a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -557,6 +557,7 @@ int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | |||
557 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 557 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
558 | int pcix_get_mmrbc(struct pci_dev *dev); | 558 | int pcix_get_mmrbc(struct pci_dev *dev); |
559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
560 | int pcie_get_readrq(struct pci_dev *dev); | ||
560 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 561 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
561 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 562 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
562 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 563 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
@@ -578,6 +579,9 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
578 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 579 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
579 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 580 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
580 | 581 | ||
582 | /* Functions for PCI Hotplug drivers to use */ | ||
583 | int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
584 | |||
581 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 585 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
582 | void pci_bus_assign_resources(struct pci_bus *bus); | 586 | void pci_bus_assign_resources(struct pci_bus *bus); |
583 | void pci_bus_size_bridges(struct pci_bus *bus); | 587 | void pci_bus_size_bridges(struct pci_bus *bus); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 8938d59013c6..f77944e432f2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -360,6 +360,9 @@ | |||
360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 | 360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 |
361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 | 361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 |
362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 | 362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 |
363 | #define PCI_DEVICE_ID_ATI_RD580 0x5952 | ||
364 | #define PCI_DEVICE_ID_ATI_RX790 0x5957 | ||
365 | #define PCI_DEVICE_ID_ATI_RS690 0x7910 | ||
363 | /* ATI IXP Chipset */ | 366 | /* ATI IXP Chipset */ |
364 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 | 367 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 |
365 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 | 368 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 |
diff --git a/lib/iomap.c b/lib/iomap.c index a57d262a5ed9..864f2ec1966e 100644 --- a/lib/iomap.c +++ b/lib/iomap.c | |||
@@ -240,7 +240,20 @@ void ioport_unmap(void __iomem *addr) | |||
240 | EXPORT_SYMBOL(ioport_map); | 240 | EXPORT_SYMBOL(ioport_map); |
241 | EXPORT_SYMBOL(ioport_unmap); | 241 | EXPORT_SYMBOL(ioport_unmap); |
242 | 242 | ||
243 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 243 | /** |
244 | * pci_iomap - create a virtual mapping cookie for a PCI BAR | ||
245 | * @dev: PCI device that owns the BAR | ||
246 | * @bar: BAR number | ||
247 | * @maxlen: length of the memory to map | ||
248 | * | ||
249 | * Using this function you will get a __iomem address to your device BAR. | ||
250 | * You can access it using ioread*() and iowrite*(). These functions hide | ||
251 | * the details if this is a MMIO or PIO address space and will just do what | ||
252 | * you expect from them in the correct way. | ||
253 | * | ||
254 | * @maxlen specifies the maximum length to map. If you want to get access to | ||
255 | * the complete BAR without checking for its length first, pass %0 here. | ||
256 | * */ | ||
244 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 257 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
245 | { | 258 | { |
246 | unsigned long start = pci_resource_start(dev, bar); | 259 | unsigned long start = pci_resource_start(dev, bar); |