[PATCH 2/8] bus/fslmc: fix bus cleanup

Kevin Traynor ktraynor at redhat.com
Mon Mar 23 17:59:35 CET 2026


On 3/23/26 10:52 AM, David Marchand wrote:
> The close operation was never closing probed devices.
> 
> Taking a step back, reevaluating the devargs makes no sense during the
> close step, as a probed device must have passed the allow/block list
> evaluation initially.
> 
> Since the device contains a reference to the driver that probed it,
> simply call this driver remove op.
> 
> Fixes: 274fd921ff7f ("bus/fslmc: support close operation")
> Cc: stable at dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
>  drivers/bus/fslmc/fslmc_vfio.c | 21 ++++-----------------
>  1 file changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
> index 550d4e0e8d..7daa18d850 100644
> --- a/drivers/bus/fslmc/fslmc_vfio.c
> +++ b/drivers/bus/fslmc/fslmc_vfio.c
> @@ -1393,7 +1393,7 @@ fslmc_close_iodevices(struct rte_dpaa2_device *dev,
>  {
>  	struct rte_dpaa2_object *object = NULL;
>  	struct rte_dpaa2_driver *drv;
> -	int ret, probe_all;
> +	int ret;
>  
>  	switch (dev->dev_type) {
>  	case DPAA2_IO:
> @@ -1411,22 +1411,9 @@ fslmc_close_iodevices(struct rte_dpaa2_device *dev,
>  	case DPAA2_ETH:
>  	case DPAA2_CRYPTO:
>  	case DPAA2_QDMA:
> -		probe_all = rte_fslmc_bus.bus.conf.scan_mode !=
> -			    RTE_BUS_SCAN_ALLOWLIST;
> -		TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) {
> -			if (drv->drv_type != dev->dev_type)
> -				continue;
> -			if (rte_dev_is_probed(&dev->device))
> -				continue;
> -			if (probe_all ||
> -			    (dev->device.devargs &&
> -			     dev->device.devargs->policy ==
> -			     RTE_DEV_ALLOWED)) {
> -				ret = drv->remove(dev);
> -				if (ret)
> -					DPAA2_BUS_ERR("Unable to remove");
> -			}
> -		}
> +		drv = dev->driver;
> +		if (drv && drv->remove && drv->remove(dev))

Not new but dpaa2_qdma_remove doesn't return an error which seems like a
bug, but it has it's own log and it's just a log here anyway, so not
critical.

> +			DPAA2_BUS_ERR("Unable to remove");
>  		break;
>  	default:
>  		break;



More information about the dev mailing list