Commit 8ec96e7b authored by Linus Torvalds's avatar Linus Torvalds

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
parents cb110171 88e7df0b
...@@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct ...@@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct
nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
start = vma->vm_pgoff; start = vma->vm_pgoff;
size = pci_resource_len(pdev, resno) >> PAGE_SHIFT; size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1;
if (start < size && size - start >= nr) if (start < size && size - start >= nr)
return 1; return 1;
WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n",
......
...@@ -1692,22 +1692,22 @@ static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev) ...@@ -1692,22 +1692,22 @@ static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
} }
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5706, PCI_DEVICE_ID_NX2_5706,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5706S, PCI_DEVICE_ID_NX2_5706S,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5708, PCI_DEVICE_ID_NX2_5708,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5708S, PCI_DEVICE_ID_NX2_5708S,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5709, PCI_DEVICE_ID_NX2_5709,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_NX2_5709S, PCI_DEVICE_ID_NX2_5709S,
quirk_brcm_570x_limit_vpd); quirk_brcm_570x_limit_vpd);
......
...@@ -100,7 +100,8 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size) ...@@ -100,7 +100,8 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size)
* pci_map_rom - map a PCI ROM to kernel space * pci_map_rom - map a PCI ROM to kernel space
* @pdev: pointer to pci device struct * @pdev: pointer to pci device struct
* @size: pointer to receive size of pci window over ROM * @size: pointer to receive size of pci window over ROM
* @return: kernel virtual pointer to image of ROM *
* Return: kernel virtual pointer to image of ROM
* *
* Map a PCI ROM into kernel space. If ROM is boot video ROM, * Map a PCI ROM into kernel space. If ROM is boot video ROM,
* the shadow BIOS copy will be returned instead of the * 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,7 +168,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
* pci_map_rom_copy - map a PCI ROM to kernel space, create a copy * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy
* @pdev: pointer to pci device struct * @pdev: pointer to pci device struct
* @size: pointer to receive size of pci window over ROM * @size: pointer to receive size of pci window over ROM
* @return: kernel virtual pointer to image of ROM *
* Return: kernel virtual pointer to image of ROM
* *
* Map a PCI ROM into kernel space. If ROM is boot video ROM, * Map a PCI ROM into kernel space. If ROM is boot video ROM,
* the shadow BIOS copy will be returned instead of the * the shadow BIOS copy will be returned instead of the
......
...@@ -1136,7 +1136,7 @@ static inline void pci_mmcfg_late_init(void) { } ...@@ -1136,7 +1136,7 @@ static inline void pci_mmcfg_late_init(void) { }
#endif #endif
#ifdef CONFIG_HAS_IOMEM #ifdef CONFIG_HAS_IOMEM
static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar) static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
{ {
/* /*
* Make sure the BAR is actually a memory resource, not an IO resource * Make sure the BAR is actually a memory resource, not an IO resource
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment