From: Huazhong Tan Date: Thu, 28 May 2020 13:48:19 +0000 (+0800) Subject: net: hns3: print out speed info when parsing speed fails X-Git-Tag: baikal/mips/sdk5.9~13530^2~66^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=f6f959fa141d37009709f03cd4d7120b4dace5b2;p=kernel.git net: hns3: print out speed info when parsing speed fails When calling hclge_parse_speed() fails, printing out the speed is helpful for debugging. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 1e4f28518d692..96bfad52630d3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1387,7 +1387,8 @@ static int hclge_configure(struct hclge_dev *hdev) ret = hclge_parse_speed(cfg.default_speed, &hdev->hw.mac.speed); if (ret) { - dev_err(&hdev->pdev->dev, "Get wrong speed ret=%d.\n", ret); + dev_err(&hdev->pdev->dev, "failed to parse speed %u, ret = %d\n", + cfg.default_speed, ret); return ret; }