summaryrefslogtreecommitdiffstats
path: root/pcilib/pci.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-11-19 03:19:51 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-11-19 03:19:51 +0100
commit6191a86bf2de5413cc9100e1450b541e5dfcb8f9 (patch)
treec4edeb5e91aa4098c55d01a00f2d292d0635ae61 /pcilib/pci.c
parent46754246bddd1c15d61e915bd860448bab8d7400 (diff)
downloadpcitool-6191a86bf2de5413cc9100e1450b541e5dfcb8f9.tar.gz
pcitool-6191a86bf2de5413cc9100e1450b541e5dfcb8f9.tar.bz2
pcitool-6191a86bf2de5413cc9100e1450b541e5dfcb8f9.tar.xz
pcitool-6191a86bf2de5413cc9100e1450b541e5dfcb8f9.zip
Support setting payload size
Diffstat (limited to 'pcilib/pci.c')
-rw-r--r--pcilib/pci.c7
1 files changed, 7 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;
+}