diff options
Diffstat (limited to 'pcilib')
-rw-r--r-- | pcilib/pci.c | 7 | ||||
-rw-r--r-- | pcilib/pci.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c index 26dfdbf..eaf41ac 100644 --- a/pcilib/pci.c +++ b/pcilib/pci.c @@ -483,3 +483,10 @@ int pcilib_set_dma_mask(pcilib_t *ctx, int mask) { return 0; } + +int pcilib_set_mps(pcilib_t *ctx, int mps) { + if (ioctl(ctx->handle, PCIDRIVER_IOC_MPS, mps) < 0) + return PCILIB_ERROR_FAILED; + + return 0; +} diff --git a/pcilib/pci.h b/pcilib/pci.h index b81d295..43de485 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -124,6 +124,7 @@ int pcilib_map_register_space(pcilib_t *ctx); int pcilib_map_data_space(pcilib_t *ctx, uintptr_t addr); int pcilib_set_dma_mask(pcilib_t *ctx, int mask); +int pcilib_set_mps(pcilib_t *ctx, int mps); #ifdef __cplusplus } |