]> www.infradead.org Git - users/dwmw2/linux.git/commit
thunderbolt: dma_test: Use correct value for absent rings when creating paths
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 29 Mar 2023 10:23:04 +0000 (13:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:02:11 +0000 (16:02 +0200)
commit1c7431e0f963d297fe47f1962448ad1ce25c8e0b
treeedc93ed4a1bab417f9adb04cfe598ca36dde524c
parente805d0e51ab662f6efa8d4dd76bbf6b5e18a80c6
thunderbolt: dma_test: Use correct value for absent rings when creating paths

commit 70c2e03e9aaf17496c63f6e42333c012f5ae5307 upstream.

Both tb_xdomain_enable_paths() and tb_xdomain_disable_paths() expect -1,
not 0, if the corresponding ring is not needed. For this reason change
the driver to use correct value for the rings that are not needed.

Fixes: 180b0689425c ("thunderbolt: Allow multiple DMA tunnels over a single XDomain connection")
Cc: stable@vger.kernel.org
Reported-by: Pengfei Xu <pengfei.xu@intel.com>
Tested-by: Pengfei Xu <pengfei.xu@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/dma_test.c