diff mbox series

thunderbolt: Fix rollback in tb_port_lane_bonding_enable for lane 1

Message ID 20240114120420.35378-1-rahimi.mhmmd@gmail.com (mailing list archive)
State Accepted
Commit e8f1297ba31f9a36969c98e41663c508b8fd7fdf
Headers show
Series thunderbolt: Fix rollback in tb_port_lane_bonding_enable for lane 1 | expand

Commit Message

Mohammad Rahimi Jan. 14, 2024, 12:04 p.m. UTC
If enabling lane bonding on lane 1 of a USB4 port results in an error,
the rollback should set TB_LINK_WIDTH_SINGLE for both lanes.

Signed-off-by: Mohammad Rahimi <rahimi.mhmmd@gmail.com>
---
 drivers/thunderbolt/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Westerberg Jan. 22, 2024, 11:35 a.m. UTC | #1
On Sun, Jan 14, 2024 at 08:04:20PM +0800, Mohammad Rahimi wrote:
> If enabling lane bonding on lane 1 of a USB4 port results in an error,
> the rollback should set TB_LINK_WIDTH_SINGLE for both lanes.
> 
> Signed-off-by: Mohammad Rahimi <rahimi.mhmmd@gmail.com>

Applied to thunderbolt.git/next, thanks!
diff mbox series

Patch

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 44e9b09de47a..af5e4a650a29 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -1136,7 +1136,7 @@  int tb_port_lane_bonding_enable(struct tb_port *port)
 		ret = tb_port_set_link_width(port->dual_link_port,
 					     TB_LINK_WIDTH_DUAL);
 		if (ret)
-			goto err_lane0;
+			goto err_lane1;
 	}
 
 	/*