From: Thomas Monjalon <thomas@monjalon.net>
To: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] drivers/bus: fill driver reference after NXP probing
Date: Tue, 25 Sep 2018 21:22:59 +0200 [thread overview]
Message-ID: <20180925192259.12249-1-thomas@monjalon.net> (raw)
The probing functions of NXP buses were missing to set
the driver used for successfully probing a device.
The NXP driver and the generic rte_driver are now set
in the device structures.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/bus/dpaa/dpaa_bus.c | 6 +++++-
drivers/bus/fslmc/fslmc_bus.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 16fabd1be..49cd04dbb 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -563,8 +563,12 @@ rte_dpaa_bus_probe(void)
dev->device.devargs->policy ==
RTE_DEV_WHITELISTED)) {
ret = drv->probe(drv, dev);
- if (ret)
+ if (ret) {
DPAA_BUS_ERR("Unable to probe.\n");
+ } else {
+ dev->driver = drv;
+ dev->device.driver = &drv->driver;
+ }
}
break;
}
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index d2900edc5..bfe81e236 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -396,8 +396,12 @@ rte_fslmc_probe(void)
dev->device.devargs->policy ==
RTE_DEV_WHITELISTED)) {
ret = drv->probe(drv, dev);
- if (ret)
+ if (ret) {
DPAA2_BUS_ERR("Unable to probe");
+ } else {
+ dev->driver = drv;
+ dev->device.driver = &drv->driver;
+ }
}
break;
}
--
2.19.0
next reply other threads:[~2018-09-25 19:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 19:22 Thomas Monjalon [this message]
2018-09-26 8:12 ` Shreyansh Jain
2018-09-27 12:40 ` Thomas Monjalon
2018-09-28 12:27 ` Shreyansh Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180925192259.12249-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=shreyansh.jain@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).