[PATCH v5 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Mar 1 02:20:59 AEDT 2024


On Thu, Feb 29, 2024 at 03:15:52PM +0100, Herve Codina wrote:
> QMC channels support runtime timeslots changes but nothing is done at
> the QMC HDLC driver to handle these changes.
> 
> Use existing IFACE ioctl in order to configure the timeslots to use.

...

> +	bitmap_scatter(ts_mask, map, ts_mask_avail, 64);

Wondering if we may have returned value more useful and hence having something like

	n = bitmap_scatter(...);

> +	if (bitmap_weight(ts_mask, 64) != bitmap_weight(map, 64)) {

	if (n != ...) {

?

> +		dev_err(qmc_hdlc->dev, "Cannot translate timeslots %64pb -> (%64pb, %64pb)\n",
> +			map, ts_mask_avail, ts_mask);
> +		return -EINVAL;
> +	}

...

> +	bitmap_gather(map, ts_mask, ts_mask_avail, 64);
> +
> +	if (bitmap_weight(ts_mask, 64) != bitmap_weight(map, 64)) {
> +		dev_err(qmc_hdlc->dev, "Cannot translate timeslots (%64pb, %64pb) -> %64pb\n",
> +			ts_mask_avail, ts_mask, map);
> +		return -EINVAL;
> +	}

Ditto.

-- 
With Best Regards,
Andy Shevchenko




More information about the Linuxppc-dev mailing list