aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-07 12:18:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-07 12:18:14 -0500
commit8ec96e7bba2b8fa339b666354dffe3f47b9fa074 (patch)
tree133e83776ab622259b5a8f852f75934822c09c93 /drivers
parentcb110171a65c5a2d85ec814d498986db611040fd (diff)
parent88e7df0b7ee717f9db3333fb1248827bbdb2d4d3 (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: fix range check on mmapped sysfs resource files PCI: remove excess kernel-doc notation PCI: annotate return value of pci_ioremap_bar with __iomem PCI: fix VPD limit quirk for Broadcom 5708S
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci-sysfs.c2
-rw-r--r--drivers/pci/quirks.c36
-rw-r--r--drivers/pci/rom.c6
3 files changed, 23 insertions, 21 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 110022d78689..5d72866897a8 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct
575 575
576 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 576 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
577 start = vma->vm_pgoff; 577 start = vma->vm_pgoff;
578 size = pci_resource_len(pdev, resno) >> PAGE_SHIFT; 578 size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1;
579 if (start < size && size - start >= nr) 579 if (start < size && size - start >= nr)
580 return 1; 580 return 1;
581 WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", 581 WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n",
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index bbf66ea8fd87..5049a47030ac 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1692,24 +1692,24 @@ static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
1692 } 1692 }
1693} 1693}
1694 1694
1695DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1695DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1696 PCI_DEVICE_ID_NX2_5706, 1696 PCI_DEVICE_ID_NX2_5706,
1697 quirk_brcm_570x_limit_vpd); 1697 quirk_brcm_570x_limit_vpd);
1698DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1698DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1699 PCI_DEVICE_ID_NX2_5706S, 1699 PCI_DEVICE_ID_NX2_5706S,
1700 quirk_brcm_570x_limit_vpd); 1700 quirk_brcm_570x_limit_vpd);
1701DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1701DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1702 PCI_DEVICE_ID_NX2_5708, 1702 PCI_DEVICE_ID_NX2_5708,
1703 quirk_brcm_570x_limit_vpd); 1703 quirk_brcm_570x_limit_vpd);
1704DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1704DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1705 PCI_DEVICE_ID_NX2_5708S, 1705 PCI_DEVICE_ID_NX2_5708S,
1706 quirk_brcm_570x_limit_vpd); 1706 quirk_brcm_570x_limit_vpd);
1707DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1707DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1708 PCI_DEVICE_ID_NX2_5709, 1708 PCI_DEVICE_ID_NX2_5709,
1709 quirk_brcm_570x_limit_vpd); 1709 quirk_brcm_570x_limit_vpd);
1710DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 1710DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
1711 PCI_DEVICE_ID_NX2_5709S, 1711 PCI_DEVICE_ID_NX2_5709S,
1712 quirk_brcm_570x_limit_vpd); 1712 quirk_brcm_570x_limit_vpd);
1713 1713
1714#ifdef CONFIG_PCI_MSI 1714#ifdef CONFIG_PCI_MSI
1715/* Some chipsets do not support MSI. We cannot easily rely on setting 1715/* Some chipsets do not support MSI. We cannot easily rely on setting
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index 1f5f6143f35c..132a78159b60 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -100,7 +100,8 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size)
100 * pci_map_rom - map a PCI ROM to kernel space 100 * pci_map_rom - map a PCI ROM to kernel space
101 * @pdev: pointer to pci device struct 101 * @pdev: pointer to pci device struct
102 * @size: pointer to receive size of pci window over ROM 102 * @size: pointer to receive size of pci window over ROM
103 * @return: kernel virtual pointer to image of ROM 103 *
104 * Return: kernel virtual pointer to image of ROM
104 * 105 *
105 * Map a PCI ROM into kernel space. If ROM is boot video ROM, 106 * Map a PCI ROM into kernel space. If ROM is boot video ROM,
106 * the shadow BIOS copy will be returned instead of the 107 * the shadow BIOS copy will be returned instead of the
@@ -167,7 +168,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
167 * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy 168 * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy
168 * @pdev: pointer to pci device struct 169 * @pdev: pointer to pci device struct
169 * @size: pointer to receive size of pci window over ROM 170 * @size: pointer to receive size of pci window over ROM
170 * @return: kernel virtual pointer to image of ROM 171 *
172 * Return: kernel virtual pointer to image of ROM
171 * 173 *
172 * Map a PCI ROM into kernel space. If ROM is boot video ROM, 174 * Map a PCI ROM into kernel space. If ROM is boot video ROM,
173 * the shadow BIOS copy will be returned instead of the 175 * the shadow BIOS copy will be returned instead of the