soc: hisilicon: kunpeng_hccs: Fix incorrect log information
Huisong Li
maintainerPATCH 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
@@ -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
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.Signed-off-by Huisong Li <[email protected]>
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@@ -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 ; } }
lihuisong (C)
maintainerQuoted 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
Signed-off-by Huisong Li <[email protected]>Reviewed-by Jonathan Cameron <[email protected]>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@@ -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 ; } }
Wei Xu
AppliedHi 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.Signed-off-by Huisong Li <[email protected]>--- drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/soc/hisilicon/kunpeng_hccs.c +0
-0@@ -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