diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-11-18 06:28:28 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-11-18 06:28:28 +0100 |
commit | e30eddc0aeb368814d2bbe0031e6b6ed768bdfcf (patch) | |
tree | df52925dedd955f40b7f861fc223a9766ae3fe15 /pcilib/pci.c | |
parent | 815924bac97aed5e4b662d5aafeed9634b82af4a (diff) | |
download | pcitool-e30eddc0aeb368814d2bbe0031e6b6ed768bdfcf.tar.gz pcitool-e30eddc0aeb368814d2bbe0031e6b6ed768bdfcf.tar.bz2 pcitool-e30eddc0aeb368814d2bbe0031e6b6ed768bdfcf.tar.xz pcitool-e30eddc0aeb368814d2bbe0031e6b6ed768bdfcf.zip |
Enforce 64-bit dma mask from IPEDMA if supported
Diffstat (limited to 'pcilib/pci.c')
-rw-r--r-- | pcilib/pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c index 4b8b8bb..e45aaba 100644 --- a/pcilib/pci.c +++ b/pcilib/pci.c @@ -431,3 +431,10 @@ const pcilib_pcie_link_info_t *pcilib_get_pcie_link_info(pcilib_t *ctx) { return &ctx->link_info; } + +int pcilib_set_dma_mask(pcilib_t *ctx, int mask) { + if (ioctl( ctx->handle, PCIDRIVER_IOC_SET_DMA_MASK, mask ) < 0) + return PCILIB_ERROR_FAILED; + + return 0; +} |