aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/tegra20-apb-dma.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2020-04-13 10:40:12 -0700
committerVinod Koul <vkoul@kernel.org>2020-04-27 21:26:23 +0530
commit0821009445a8261ac4d32a6df4b83938e007c765 (patch)
treed59ad9425d0c1860538d3ce6173ab4ba2d570d49 /drivers/dma/tegra20-apb-dma.c
parentdmaengine: mmp_tdma: Reset channel error on release (diff)
downloadlinux-dev-0821009445a8261ac4d32a6df4b83938e007c765.tar.xz
linux-dev-0821009445a8261ac4d32a6df4b83938e007c765.zip
dmaengine: fix channel index enumeration
When the channel register code was changed to allow hotplug operations, dynamic indexing wasn't taken into account. When channels are randomly plugged and unplugged out of order, the serial indexing breaks. Convert channel indexing to using IDA tracking in order to allow dynamic assignment. The previous code does not cause any regression bug for existing channel allocation besides idxd driver since the hotplug usage case is only used by idxd at this point. With this change, the chan->idr_ref is also not needed any longer. We can have a device with no channels registered due to hot plug. The channel device release code no longer should attempt to free the dma device id on the last channel release. Fixes: e81274cd6b52 ("dmaengine: add support to dynamic register/unregister of channels") Reported-by: Yixin Zhang <yixin.zhang@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Tested-by: Yixin Zhang <yixin.zhang@intel.com> Link: https://lore.kernel.org/r/158679961260.7674.8485924270472851852.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/tegra20-apb-dma.c')
0 files changed, 0 insertions, 0 deletions