Commit fb7ebfe4108e2cdfa2bb88e57148087717463dfa

Authored by Yinghai Lu
Committed by Jesse Barnes
1 parent cda57bf934

PCI: Increase resource array mask bit size in pcim_iomap_regions()

DEVICE_COUNT_RESOURCE will be bigger than 16 when SRIOV supported is enabled.

Let them pass with int just like pci_enable_resources().

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Showing 2 changed files with 6 additions and 6 deletions Side-by-side Diff

... ... @@ -1432,10 +1432,10 @@
1432 1432 void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1433 1433 void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
1434 1434 void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
1435   -int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
1436   -int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
  1435 +int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
  1436 +int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
1437 1437 const char *name);
1438   -void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask);
  1438 +void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
1439 1439  
1440 1440 extern int pci_pci_problems;
1441 1441 #define PCIPCI_FAIL 1 /* No PCI PCI DMA */
... ... @@ -253,7 +253,7 @@
253 253 *
254 254 * Request and iomap regions specified by @mask.
255 255 */
256   -int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name)
  256 +int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name)
257 257 {
258 258 void __iomem * const *iomap;
259 259 int i, rc;
... ... @@ -306,7 +306,7 @@
306 306 *
307 307 * Request all PCI BARs and iomap regions specified by @mask.
308 308 */
309   -int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
  309 +int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
310 310 const char *name)
311 311 {
312 312 int request_mask = ((1 << 6) - 1) & ~mask;
... ... @@ -330,7 +330,7 @@
330 330 *
331 331 * Unmap and release regions specified by @mask.
332 332 */
333   -void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask)
  333 +void pcim_iounmap_regions(struct pci_dev *pdev, int mask)
334 334 {
335 335 void __iomem * const *iomap;
336 336 int i;