diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-17 17:23:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-17 17:23:35 -0500 |
commit | c951aa62d59210636cc63a569bcf3331be7f5b15 (patch) | |
tree | 151cde34d789db9fd8cf224603edff635997561a /drivers/pci | |
parent | 23beafbe3abd3f622931e83ef4e6b17642cf408e (diff) | |
parent | a08f6e04d74478d91f34a0484e69e89870adb33d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: Documentation: fix minor PCIe HOWTO thinko
PCI: fix missing kernel-doc and typos
PCI: fix struct pci_platform_pm_ops kernel-doc
PCI: fix rom.c kernel-doc warning
PCI/MSI: fix msi_mask() shift fix
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 10 | ||||
-rw-r--r-- | drivers/pci/pci.c | 13 | ||||
-rw-r--r-- | drivers/pci/pci.h | 20 | ||||
-rw-r--r-- | drivers/pci/rom.c | 1 |
4 files changed, 24 insertions, 20 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 44f15ff70c1d..baba2eb5367d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -103,14 +103,12 @@ static void msix_set_enable(struct pci_dev *dev, int enable) | |||
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | /* | ||
107 | * Essentially, this is ((1 << (1 << x)) - 1), but without the | ||
108 | * undefinedness of a << 32. | ||
109 | */ | ||
110 | static inline __attribute_const__ u32 msi_mask(unsigned x) | 106 | static inline __attribute_const__ u32 msi_mask(unsigned x) |
111 | { | 107 | { |
112 | static const u32 mask[] = { 1, 2, 4, 0xf, 0xff, 0xffff, 0xffffffff }; | 108 | /* Don't shift by >= width of type */ |
113 | return mask[x]; | 109 | if (x >= 5) |
110 | return 0xffffffff; | ||
111 | return (1 << (1 << x)) - 1; | ||
114 | } | 112 | } |
115 | 113 | ||
116 | static void msix_flush_writes(struct irq_desc *desc) | 114 | static void msix_flush_writes(struct irq_desc *desc) |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e3efe6b19ee7..6d6120007af4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1540,16 +1540,21 @@ void pci_release_region(struct pci_dev *pdev, int bar) | |||
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | /** | 1542 | /** |
1543 | * pci_request_region - Reserved PCI I/O and memory resource | 1543 | * __pci_request_region - Reserved PCI I/O and memory resource |
1544 | * @pdev: PCI device whose resources are to be reserved | 1544 | * @pdev: PCI device whose resources are to be reserved |
1545 | * @bar: BAR to be reserved | 1545 | * @bar: BAR to be reserved |
1546 | * @res_name: Name to be associated with resource. | 1546 | * @res_name: Name to be associated with resource. |
1547 | * @exclusive: whether the region access is exclusive or not | ||
1547 | * | 1548 | * |
1548 | * Mark the PCI region associated with PCI device @pdev BR @bar as | 1549 | * Mark the PCI region associated with PCI device @pdev BR @bar as |
1549 | * being reserved by owner @res_name. Do not access any | 1550 | * being reserved by owner @res_name. Do not access any |
1550 | * address inside the PCI regions unless this call returns | 1551 | * address inside the PCI regions unless this call returns |
1551 | * successfully. | 1552 | * successfully. |
1552 | * | 1553 | * |
1554 | * If @exclusive is set, then the region is marked so that userspace | ||
1555 | * is explicitly not allowed to map the resource via /dev/mem or | ||
1556 | * sysfs MMIO access. | ||
1557 | * | ||
1553 | * Returns 0 on success, or %EBUSY on error. A warning | 1558 | * Returns 0 on success, or %EBUSY on error. A warning |
1554 | * message is also printed on failure. | 1559 | * message is also printed on failure. |
1555 | */ | 1560 | */ |
@@ -1588,12 +1593,12 @@ err_out: | |||
1588 | } | 1593 | } |
1589 | 1594 | ||
1590 | /** | 1595 | /** |
1591 | * pci_request_region - Reserved PCI I/O and memory resource | 1596 | * pci_request_region - Reserve PCI I/O and memory resource |
1592 | * @pdev: PCI device whose resources are to be reserved | 1597 | * @pdev: PCI device whose resources are to be reserved |
1593 | * @bar: BAR to be reserved | 1598 | * @bar: BAR to be reserved |
1594 | * @res_name: Name to be associated with resource. | 1599 | * @res_name: Name to be associated with resource |
1595 | * | 1600 | * |
1596 | * Mark the PCI region associated with PCI device @pdev BR @bar as | 1601 | * Mark the PCI region associated with PCI device @pdev BAR @bar as |
1597 | * being reserved by owner @res_name. Do not access any | 1602 | * being reserved by owner @res_name. Do not access any |
1598 | * address inside the PCI regions unless this call returns | 1603 | * address inside the PCI regions unless this call returns |
1599 | * successfully. | 1604 | * successfully. |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 26ddf78ac300..07c0aa5275e6 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -16,21 +16,21 @@ extern int pci_mmap_fits(struct pci_dev *pdev, int resno, | |||
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Firmware PM callbacks | 19 | * struct pci_platform_pm_ops - Firmware PM callbacks |
20 | * | 20 | * |
21 | * @is_manageable - returns 'true' if given device is power manageable by the | 21 | * @is_manageable: returns 'true' if given device is power manageable by the |
22 | * platform firmware | 22 | * platform firmware |
23 | * | 23 | * |
24 | * @set_state - invokes the platform firmware to set the device's power state | 24 | * @set_state: invokes the platform firmware to set the device's power state |
25 | * | 25 | * |
26 | * @choose_state - returns PCI power state of given device preferred by the | 26 | * @choose_state: returns PCI power state of given device preferred by the |
27 | * platform; to be used during system-wide transitions from a | 27 | * platform; to be used during system-wide transitions from a |
28 | * sleeping state to the working state and vice versa | 28 | * sleeping state to the working state and vice versa |
29 | * | 29 | * |
30 | * @can_wakeup - returns 'true' if given device is capable of waking up the | 30 | * @can_wakeup: returns 'true' if given device is capable of waking up the |
31 | * system from a sleeping state | 31 | * system from a sleeping state |
32 | * | 32 | * |
33 | * @sleep_wake - enables/disables the system wake up capability of given device | 33 | * @sleep_wake: enables/disables the system wake up capability of given device |
34 | * | 34 | * |
35 | * If given platform is generally capable of power managing PCI devices, all of | 35 | * If given platform is generally capable of power managing PCI devices, all of |
36 | * these callbacks are mandatory. | 36 | * these callbacks are mandatory. |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 29cbe47f219f..36864a935d68 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -55,6 +55,7 @@ void pci_disable_rom(struct pci_dev *pdev) | |||
55 | 55 | ||
56 | /** | 56 | /** |
57 | * pci_get_rom_size - obtain the actual size of the ROM image | 57 | * pci_get_rom_size - obtain the actual size of the ROM image |
58 | * @pdev: target PCI device | ||
58 | * @rom: kernel virtual pointer to image of ROM | 59 | * @rom: kernel virtual pointer to image of ROM |
59 | * @size: size of PCI window | 60 | * @size: size of PCI window |
60 | * return: size of actual ROM image | 61 | * return: size of actual ROM image |