summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-11-19 03:47:04 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-11-19 03:47:04 +0100
commit8ee679f837aed09f2abe5d47186505f98ccb4b6d (patch)
treef9f88b6f1b331fddffb03f49b20f7cccbf8e78e0 /driver
parent23bf23582f1745ff1e273bb7935d0ded0dd3013b (diff)
downloadpcitool-8ee679f837aed09f2abe5d47186505f98ccb4b6d.tar.gz
pcitool-8ee679f837aed09f2abe5d47186505f98ccb4b6d.tar.bz2
pcitool-8ee679f837aed09f2abe5d47186505f98ccb4b6d.tar.xz
pcitool-8ee679f837aed09f2abe5d47186505f98ccb4b6d.zip
Inform user-space about read request size as well
Diffstat (limited to 'driver')
-rw-r--r--driver/ioctl.c2
-rw-r--r--driver/pciDriver.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/driver/ioctl.c b/driver/ioctl.c
index 67cdc52..0814fc8 100644
--- a/driver/ioctl.c
+++ b/driver/ioctl.c
@@ -448,9 +448,11 @@ static int ioctl_device_state(pcidriver_privdata_t *privdata, unsigned long arg)
info = (pcilib_device_state_t) {
.iommu = iommu_present(privdata->pdev->dev.bus),
.mps = pcidriver_pcie_get_mps(privdata->pdev),
+ .readrq = pcie_get_readrq(privdata->pdev),
.dma_mask = privdata->pdev->dma_mask
};
+
WRITE_TO_USER(pcilib_device_state_t, info);
return 0;
diff --git a/driver/pciDriver.h b/driver/pciDriver.h
index 2fda0ff..5d6221e 100644
--- a/driver/pciDriver.h
+++ b/driver/pciDriver.h
@@ -131,7 +131,8 @@ typedef struct {
typedef struct {
int iommu; /**< Specifies if IOMMU is enabled or disabled */
- int mps; /**< Maximum payload size */
+ int mps; /**< PCIe maximum payload size */
+ int readrq; /**< PCIe read request size */
unsigned long dma_mask; /**< DMA mask */
} pcilib_device_state_t;