Skip to contentSkip to conversation

soc: hisilicon: kunpeng_hccs: Fix incorrect log information

PATCH Applied Huisong Li 3 participants 4 messages Jul 11, 2025 – Jul 18, 2025 HiSilicon kunpeng SoC hccs driver

lore
Share & tools
lore

Huisong Li

author maintainer
#0 lore raw

PATCH 1/1 soc: hisilicon: kunpeng_hccs: Fix incorrect log information

The hccs_get_all_spec_port_idle_sta() will tell user which port is busy when firmware doesn't allow to decrease HCCS lane number. However, the current log prints the index of die and port instead of the hardware ID user perceived.

---
 drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/hisilicon/kunpeng_hccs.c +2 -2
index 7fc353732d55..65ff45fdcac7 100644
@@ -1295,11 +1295,11 @@ static int hccs_get_all_spec_port_idle_sta(struct hccs_dev *hdev, u8 port_type,
 				if (ret) {
 					dev_err(hdev->dev,
 						"hccs%u on chip%u/die%u get idle status failed, ret = %d.\n",
-						k, i, j, ret);
+						port->port_id, chip->chip_id, die->die_id, ret);
 					return ret;
 				} else if (idle == 0) {
 					dev_info(hdev->dev, "hccs%u on chip%u/die%u is busy.\n",
-						k, i, j);
+						 port->port_id, chip->chip_id, die->die_id);
 					return 0;
 				}
 			}
Signature · 1 line
2.33.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Fri, 11 Jul 2025 14:37:06 +0800 Huisong Li <[email protected]> wrote:

The hccs_get_all_spec_port_idle_sta() will tell user which port is busy when firmware doesn't allow to decrease HCCS lane number. However, the current log prints the index of die and port instead of the hardware ID user perceived.

Maybe adding an example of a wrong print and how it is fixed to this patch description would make the problem even more obvious? Not worth respin for that though!

Quoted 22 lines
---
 drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/hisilicon/kunpeng_hccs.c +2 -2
index 7fc353732d55..65ff45fdcac7 100644
@@ -1295,11 +1295,11 @@ static int hccs_get_all_spec_port_idle_sta(struct hccs_dev *hdev, u8 port_type,
 				if (ret) {
 					dev_err(hdev->dev,
 						"hccs%u on chip%u/die%u get idle status failed, ret = %d.\n",
-						k, i, j, ret);
+						port->port_id, chip->chip_id, die->die_id, ret);
 					return ret;
 				} else if (idle == 0) {
 					dev_info(hdev->dev, "hccs%u on chip%u/die%u is busy.\n",
-						k, i, j);
+						 port->port_id, chip->chip_id, die->die_id);
 					return 0;
 				}
 			}
author maintainer
#2 lore raw
Quoted 8 lines · Jonathan Cameron
Quoted 5 lines · On Fri, 11 Jul 2025 14:37:06 +0800 Huisong Li <[email protected]> wrote:

The hccs_get_all_spec_port_idle_sta() will tell user which port is busy when firmware doesn't allow to decrease HCCS lane number. However, the current log prints the index of die and port instead of the hardware ID user perceived.

Quoted 5 lines
Quoted 1 line

Maybe adding an example of a wrong print and how it is fixed to this patch description would make the problem even more obvious?

Yes.
The problem and modification are very simple, and this description is also enough.

Quoted 1 line

Not worth respin for that though!

ok, thanks for your review.

Quoted 23 lines
Quoted 23 lines
---
  drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/hisilicon/kunpeng_hccs.c +2 -2
index 7fc353732d55..65ff45fdcac7 100644
@@ -1295,11 +1295,11 @@ static int hccs_get_all_spec_port_idle_sta(struct hccs_dev *hdev, u8 port_type,
  				if (ret) {
  					dev_err(hdev->dev,
  						"hccs%u on chip%u/die%u get idle status failed, ret = %d.\n",
-						k, i, j, ret);
+						port->port_id, chip->chip_id, die->die_id, ret);
  					return ret;
  				} else if (idle == 0) {
  					dev_info(hdev->dev, "hccs%u on chip%u/die%u is busy.\n",
-						k, i, j);
+						 port->port_id, chip->chip_id, die->die_id);
  					return 0;
  				}
  			}
Applied
#3 lore raw
In reply to Huisong Li

Hi Huisong,

Quoted 19 lines · Huisong Li

The hccs_get_all_spec_port_idle_sta() will tell user which port is busy when firmware doesn't allow to decrease HCCS lane number. However, the current log prints the index of die and port instead of the hardware ID user perceived.

---
 drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/hisilicon/kunpeng_hccs.c +0 -0
index 7fc353732d55..65ff45fdcac7 100644
@@ -1295,11 +1295,11 @@ static int hccs_get_all_spec_port_idle_sta(struct hccs_dev *hdev, u8 port_type,
 				if (ret) {
 					dev_err(hdev->dev,
 						"hccs%u on chip%u/die%u get idle status failed, ret = %d.\n",

drivers/soc/hisilicon/kunpeng_hccs.c static int hccs_get_all_spec_port_idle_sta(struct hccs_dev *hdev, u8 port_type, · line 1305

Quoted 10 lines
drivers/soc/hisilicon/kunpeng_hccs.c +2 -2
-						k, i, j, ret);
+						port->port_id, chip->chip_id, die->die_id, ret);
 					return ret;
 				} else if (idle == 0) {
 					dev_info(hdev->dev, "hccs%u on chip%u/die%u is busy.\n",
-						k, i, j);
+						 port->port_id, chip->chip_id, die->die_id);
 					return 0;
 				}
 			}

Applied to the Hisilicon driver tree.
Thanks!

Best Regards,
Wei