From cd294fef2bb22262bb43d912cb2eedea7c986f77 Mon Sep 17 00:00:00 2001
From: Bingquan Mou <moubingquan@huawei.com>
Date: Sat, 26 Aug 2023 11:10:51 +0800
Subject: [PATCH] hikptool: fix don`t show gen5 problem

The mac_rate field does not support displaying the GEN5 rate.
Therefore, the rxl0s_st field is added to determine the rate together with the mac_rate field.

Signed-off-by: Bingquan Mou <moubingquan@huawei.com>
---
 pcie/func_lib/pcie_func/pcie_link_ltssm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pcie/func_lib/pcie_func/pcie_link_ltssm.c b/pcie/func_lib/pcie_func/pcie_link_ltssm.c
index 09d3b5e..156f4be 100644
--- a/pcie/func_lib/pcie_func/pcie_link_ltssm.c
+++ b/pcie/func_lib/pcie_func/pcie_link_ltssm.c
@@ -213,7 +213,8 @@ static int pcie_print_ltssm_trace(const uint64_t *ltssm_input, uint32_t ltssm_nu
 			(uint32_t)ltssm_val.bits.any_change_pipe_req,
 			(uint32_t)ltssm_val.bits.rxl0s_st,
 			(uint32_t)ltssm_val.bits.train_bit_map1,
-			(uint32_t)ltssm_val.bits.mac_rate,
+			(((uint32_t)ltssm_val.bits.rxl0s_st) << 2) |
+			((uint32_t)ltssm_val.bits.mac_rate),
 			(uint32_t)ltssm_val.bits.duration_counter,
 			(uint32_t)ltssm_val.bits.ltssm_state,
 			ltssm_c);
-- 
2.33.0

