Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: thunderbolt: Fix the parameter passing of tb_xdomain_enable_paths()/tb_xdomain_disable_paths()

According to the description of tb_xdomain_enable_paths(), the third
parameter represents the transmit ring and the fifth parameter represents
the receive ring. tb_xdomain_disable_paths() is the same case.

[Jakub] Mika says: it works now because both rings ->hop is the same

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/20250625051149.GD2824380@black.fi.intel.com
Signed-off-by: zhangjianrong <zhangjianrong5@huawei.com>
Link: https://patch.msgid.link/20250628094920.656658-1-zhangjianrong5@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

zhangjianrong and committed by
Jakub Kicinski
8ec31cb1 e96ee511

+4 -4
+4 -4
drivers/net/thunderbolt/main.c
··· 396 396 397 397 ret = tb_xdomain_disable_paths(net->xd, 398 398 net->local_transmit_path, 399 - net->rx_ring.ring->hop, 399 + net->tx_ring.ring->hop, 400 400 net->remote_transmit_path, 401 - net->tx_ring.ring->hop); 401 + net->rx_ring.ring->hop); 402 402 if (ret) 403 403 netdev_warn(net->dev, "failed to disable DMA paths\n"); 404 404 ··· 662 662 goto err_free_rx_buffers; 663 663 664 664 ret = tb_xdomain_enable_paths(net->xd, net->local_transmit_path, 665 - net->rx_ring.ring->hop, 665 + net->tx_ring.ring->hop, 666 666 net->remote_transmit_path, 667 - net->tx_ring.ring->hop); 667 + net->rx_ring.ring->hop); 668 668 if (ret) { 669 669 netdev_err(net->dev, "failed to enable DMA paths\n"); 670 670 goto err_free_tx_buffers;