drivers/bus: fill driver reference after NXP probing
PATCH 1/1 drivers/bus: fill driver reference after NXP probing
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.
--- drivers/bus/dpaa/dpaa_bus.c | 6 +++++- drivers/bus/fslmc/fslmc_bus.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/bus/dpaa/dpaa_bus.c +5 -1
@@ -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 ; }
drivers/bus/fslmc/fslmc_bus.c +5 -1
@@ -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 ; }
Signature · 1 line
2.19.0
Quoted 8 lines · Thomas Monjalon
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_driverare now set in the device structures.Signed-off-by Thomas Monjalon <[email protected]>---
A part of this was already being done in the drv->probe(), though it was
not complete (dpaa2_dev->driver = dpaa2_drv; was not being done).
--->8---net/dpaa2/dpaa2_ethdev.c--
2008
2009 eth_dev->device = &dpaa2_dev->device;
2010 eth_dev->device->driver = &dpaa2_drv->driver;
2011
--->8---
Thank you!
Thomas Monjalon
Applied26/09/2018 10:12, Shreyansh Jain:
Quoted 13 lines · Thomas Monjalon
Quoted 8 lines
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_driverare now set in the device structures.Signed-off-by Thomas Monjalon <[email protected]>---
A part of this was already being done in the
drv->probe(), though it was
not complete (dpaa2_dev->driver=dpaa2_drv; was not being done).
Quoted 6 lines
--->8---net/dpaa2/dpaa2_ethdev.c--
2008
2009eth_dev->device=&dpaa2_dev->device;
2010eth_dev->device->driver=&dpaa2_drv->driver;
2011
--->8---
I guess we could remove the driver assignment in NXP drivers, after this patch applied.
Quoted 3 lines
Thank you!
Acked-by Shreyansh Jain <[email protected]>
Applied
Quoted 21 lines · Thomas Monjalon
26/09/2018 10:12, Shreyansh Jain:
Quoted 13 lines · Thomas Monjalon
Quoted 8 lines
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_driverare now set in the device structures.Signed-off-by Thomas Monjalon <[email protected]>---
A part of this was already being done in the
drv->probe(), though it was
not complete (dpaa2_dev->driver=dpaa2_drv; was not being done).Quoted 6 lines
--->8---net/dpaa2/dpaa2_ethdev.c--
2008
2009eth_dev->device=&dpaa2_dev->device;
2010eth_dev->device->driver=&dpaa2_drv->driver;
2011
--->8---
Quoted 3 lines
I guess we could remove the driver assignment in NXP drivers, after this patch applied.
Sent. I have kept fixes reference to your patch.