]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: thunderbolt: Fix the parameter passing of tb_xdomain_enable_paths()/tb_xdomain_d...
authorzhangjianrong <zhangjianrong5@huawei.com>
Sat, 28 Jun 2025 09:49:20 +0000 (17:49 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Jul 2025 21:15:09 +0000 (14:15 -0700)
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>
drivers/net/thunderbolt/main.c

index 0a53ec293d0408b591467baca93e1e1ff0999191..f4c78275956622c2e46d927557655e5a3a8662fa 100644 (file)
@@ -396,9 +396,9 @@ static void tbnet_tear_down(struct tbnet *net, bool send_logout)
 
                ret = tb_xdomain_disable_paths(net->xd,
                                               net->local_transmit_path,
-                                              net->rx_ring.ring->hop,
+                                              net->tx_ring.ring->hop,
                                               net->remote_transmit_path,
-                                              net->tx_ring.ring->hop);
+                                              net->rx_ring.ring->hop);
                if (ret)
                        netdev_warn(net->dev, "failed to disable DMA paths\n");
 
@@ -662,9 +662,9 @@ static void tbnet_connected_work(struct work_struct *work)
                goto err_free_rx_buffers;
 
        ret = tb_xdomain_enable_paths(net->xd, net->local_transmit_path,
-                                     net->rx_ring.ring->hop,
+                                     net->tx_ring.ring->hop,
                                      net->remote_transmit_path,
-                                     net->tx_ring.ring->hop);
+                                     net->rx_ring.ring->hop);
        if (ret) {
                netdev_err(net->dev, "failed to enable DMA paths\n");
                goto err_free_tx_buffers;