From nobody Wed Oct 8 11:39:37 2025 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4608B1EF39F; Sat, 28 Jun 2025 09:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751104173; cv=none; b=b3RJNmN5cvXIGgIuvKC657i9F1V8oKxpEqIjq/Qhv6AGZPY1UALMB2ZXhfMMiUIcpkfPKCaowJAYZaaVkajB/OewDTNZ5C+kMHJwanUprgXCVd4exYOLpNAFjtJH3yfcliYJLIZuFQ07qLY4ori/lql4+qKK3WWZShRh2NYdX/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751104173; c=relaxed/simple; bh=nOOWoV01N7bOxZty/tGuJqK+VI+KOzlbuwhA9piXDJA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GHhypi90XsenRqHfdS5JXlILgXZT4NvD5xnjSMmipV5P2koAX8ppYEzFRrDdPD3t7Jccb55+jofgzAzPAAANNPfvx+gsyL5YcZIhIRnYu5kuO6kYLDE9FoCQmSfrucTnFWmlKrlTBDqeetlu2EqHW4rxIzMGz6BwMTjjE+biIeg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4bTnbQ4HqCz2CfCX; Sat, 28 Jun 2025 17:45:22 +0800 (CST) Received: from kwepemk100010.china.huawei.com (unknown [7.202.194.58]) by mail.maildlp.com (Postfix) with ESMTPS id 777F01402C4; Sat, 28 Jun 2025 17:49:21 +0800 (CST) Received: from workspace-z00536909-5022804397323726849.huawei.com (7.151.123.135) by kwepemk100010.china.huawei.com (7.202.194.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 28 Jun 2025 17:49:20 +0800 From: zhangjianrong To: , , , , , , , , , CC: , , , Subject: [PATCH v2] net: thunderbolt: Fix the parameter passing of tb_xdomain_enable_paths()/tb_xdomain_disable_paths() Date: Sat, 28 Jun 2025 17:49:20 +0800 Message-ID: <20250628094920.656658-1-zhangjianrong5@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems500002.china.huawei.com (7.221.188.17) To kwepemk100010.china.huawei.com (7.202.194.58) Content-Type: text/plain; charset="utf-8" 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. Fixes: ff7cd07f3064 ("net: thunderbolt: Enable DMA paths only after rings a= re enabled") Signed-off-by: zhangjianrong --- v2: add fixes tag v1: initial submission drivers/net/thunderbolt/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c index 0a53ec293d04..f4c782759566 100644 --- a/drivers/net/thunderbolt/main.c +++ b/drivers/net/thunderbolt/main.c @@ -396,9 +396,9 @@ static void tbnet_tear_down(struct tbnet *net, bool sen= d_logout) =20 ret =3D 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"); =20 @@ -662,9 +662,9 @@ static void tbnet_connected_work(struct work_struct *wo= rk) goto err_free_rx_buffers; =20 ret =3D 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; --=20 2.34.1