Skip to content

Commit fb7ebfe

Browse files
Yinghai Lujbarnes993
authored andcommitted
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>
1 parent cda57bf commit fb7ebfe

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎include/linux/pci.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,10 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
14321432
void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
14331433
void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
14341434
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,
14371437
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);
14391439

14401440
extern int pci_pci_problems;
14411441
#define PCIPCI_FAIL 1 /* No PCI PCI DMA */

‎lib/devres.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ EXPORT_SYMBOL(pcim_iounmap);
253253
*
254254
* Request and iomap regions specified by @mask.
255255
*/
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)
257257
{
258258
void __iomem * const *iomap;
259259
int i, rc;
@@ -306,7 +306,7 @@ EXPORT_SYMBOL(pcim_iomap_regions);
306306
*
307307
* Request all PCI BARs and iomap regions specified by @mask.
308308
*/
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,
310310
const char *name)
311311
{
312312
int request_mask = ((1 << 6) - 1) & ~mask;
@@ -330,7 +330,7 @@ EXPORT_SYMBOL(pcim_iomap_regions_request_all);
330330
*
331331
* Unmap and release regions specified by @mask.
332332
*/
333-
void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask)
333+
void pcim_iounmap_regions(struct pci_dev *pdev, int mask)
334334
{
335335
void __iomem * const *iomap;
336336
int i;

0 commit comments

Comments
 (0)