summaryrefslogtreecommitdiff
path: root/drivers/bus/ifpga
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-09-25 22:55:27 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-18 01:49:28 +0200
commit52897e7e702b96e4ff6835ead95075b20f65392b (patch)
tree916541ae346f2cb76eabbdb76ef3d486c7aee4a9 /drivers/bus/ifpga
parent391797f04208aec3a75efd01bfa368899b2f37db (diff)
downloaddpdk-52897e7e702b96e4ff6835ead95075b20f65392b.zip
dpdk-52897e7e702b96e4ff6835ead95075b20f65392b.tar.gz
dpdk-52897e7e702b96e4ff6835ead95075b20f65392b.tar.xz
eal: add function to query device status
The function rte_dev_is_probed() is added in order to improve semantic and enforce proper check of the probing status of a device. It will answer this rte_device query: Is it already successfully probed or not? Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'drivers/bus/ifpga')
-rw-r--r--drivers/bus/ifpga/ifpga_bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index fca2dba..2ca1efa 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -301,7 +301,7 @@ ifpga_probe_all_drivers(struct rte_afu_device *afu_dev)
return -1;
/* Check if a driver is already loaded */
- if (afu_dev->device.driver != NULL)
+ if (rte_dev_is_probed(&afu_dev->device))
return 0;
TAILQ_FOREACH(drv, &ifpga_afu_drv_list, next) {
@@ -325,7 +325,7 @@ ifpga_probe(void)
int ret = 0;
TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) {
- if (afu_dev->device.driver)
+ if (rte_dev_is_probed(&afu_dev->device))
continue;
ret = ifpga_probe_all_drivers(afu_dev);